Skip to content

Commit

Permalink
feat(HMS-4648): add 413 and 431 codes to errors
Browse files Browse the repository at this point in the history
This change update the public API contract to reflect
the status code returned when a size limit happens
for the public endpoints.

https://issues.redhat.com/browse/HMS-4648

Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo authored and frasertweedale committed Sep 27, 2024
1 parent 2ee029a commit c5d7b62
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
54 changes: 54 additions & 0 deletions public.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -124,6 +130,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -173,6 +185,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -212,6 +230,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -239,6 +263,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -280,6 +310,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -326,6 +362,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -412,6 +454,12 @@
}
}
}
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down Expand Up @@ -447,6 +495,12 @@
},
"404": {
"$ref": "#/components/responses/ErrorResponse"
},
"413": {
"$ref": "#/components/responses/ErrorResponse"
},
"431": {
"$ref": "#/components/responses/ErrorResponse"
}
},
"security": [
Expand Down
36 changes: 36 additions & 0 deletions public.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:User
Expand Down Expand Up @@ -81,6 +85,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:System
Expand Down Expand Up @@ -110,6 +118,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:User
Expand All @@ -133,6 +145,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:User
Expand All @@ -150,6 +166,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:User
Expand All @@ -176,6 +196,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:User
Expand Down Expand Up @@ -204,6 +228,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:System:domain
Expand Down Expand Up @@ -257,6 +285,10 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:System:domain
Expand All @@ -279,6 +311,10 @@ paths:
$ref: '#/components/responses/ErrorResponse'
'404':
$ref: '#/components/responses/ErrorResponse'
'413':
$ref: '#/components/responses/ErrorResponse'
'431':
$ref: '#/components/responses/ErrorResponse'
security:
- x-rh-identity:
- Type:System
Expand Down

0 comments on commit c5d7b62

Please sign in to comment.