Skip to content

Commit

Permalink
add explicit error status codes for host-conf
Browse files Browse the repository at this point in the history
The host-conf resource returns 404 and 409 statuses for specific
semantic conditions.  Add these responses codes to the response
list.  Distinct and specific descriptions are given to document the
semantics, instead of referencing ErrorResponse with its generic
description.
  • Loading branch information
frasertweedale committed Sep 3, 2024
1 parent 95d9bbf commit 286b935
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
20 changes: 20 additions & 0 deletions public.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,26 @@
"responses": {
"200": {
"$ref": "#/components/responses/HostConfResponse"
},
"404": {
"description": "No enabled domains matched request parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
},
"409": {
"description": "Multiple active domains matched request parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
}
},
"security": [
Expand Down
12 changes: 12 additions & 0 deletions public.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,18 @@ paths:
responses:
'200':
$ref: '#/components/responses/HostConfResponse'
'404':
description: No enabled domains matched request parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'409':
description: Multiple active domains matched request parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
security:
- x-rh-identity:
- Type:System:domain
Expand Down

0 comments on commit 286b935

Please sign in to comment.