Skip to content

Commit

Permalink
add missing http responses
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszmarcinkowski committed Oct 30, 2024
1 parent 4dc008d commit e65c9b7
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: object
properties:
statusCode:
type: number
example: 401
error:
type: string
example: Unauthorized
message:
type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: object
properties:
statusCode:
type: number
example: 403
error:
type: string
example: Forbidden
message:
type: string
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
type: object
required:
- name
- privileges
properties:
name:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
type: object
properties:
api_key:
type: string
expiration:
type: integer
format: int64
id:
type: string
name:
type: string
encoded:
type: string
agentKey:
type: object
properties:
expiration:
type: integer
format: int64
id:
type: string
name:
type: string
encoded:
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,21 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
application/json:
schema:
$ref: '../components/schemas/404_response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ get:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'500':
description: Internal Server Error response
content:
application/json:
schema:
$ref: '../components/schemas/500_response.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ get:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
Expand Down Expand Up @@ -52,6 +58,18 @@ delete:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
Expand Down Expand Up @@ -90,6 +108,18 @@ put:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'404':
description: Not found response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ get:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ get:
- name: name
in: query
description: Service name
required: true
schema:
type: string
- name: environment
in: query
description: Service environment
required: true
schema:
type: string
responses:
Expand All @@ -30,6 +28,12 @@ get:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ get:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'500':
description: Internal Server Error response
content:
Expand Down Expand Up @@ -67,6 +73,18 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'500':
description: Internal Server Error response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ delete:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'403':
description: Forbidden response
content:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
'500':
description: Internal Server Error response
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ get:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
'401':
description: Unauthorized response
content:
application/json:
schema:
$ref: '../components/schemas/401_response.yaml'
'404':
description: Not found response
content:
Expand Down

0 comments on commit e65c9b7

Please sign in to comment.