Skip to content

Commit

Permalink
Updates after first discussion with Pedro Diez
Browse files Browse the repository at this point in the history
  • Loading branch information
bigludo7 authored Jul 17, 2024
1 parent e3e9da1 commit debe75b
Showing 1 changed file with 41 additions and 15 deletions.
56 changes: 41 additions & 15 deletions artifacts/camara-cloudevents/event-subscription-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ paths:
schema:
$ref: "#/components/schemas/SubscriptionAsync"
"400":
$ref: "#/components/responses/Generic400"
$ref: "#/components/responses/CreateSubscriptionBadRequest400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
$ref: "#/components/responses/CreateSubscriptionBadRequest403"
"409":
$ref: "#/components/responses/Generic409"
"415":
Expand Down Expand Up @@ -799,7 +799,7 @@ components:
required:
- subject
responses:
Generic400:
CreateSubscriptionBadRequest400:
description: Problem with the client request
headers:
x-correlator:
Expand Down Expand Up @@ -836,6 +836,28 @@ components:
status: 400
code: "INVALID_TOKEN"
message: "Only bearer token is supported"
Generic400:
description: Problem with the client request
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_400_INVALID_ARGUMENT:
description: Invalid Argument. Generic Syntax Exception
value:
status: 400
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param.
GENERIC_400_OUT_OF_RANGE:
description: Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested
value:
status: 400
code: OUT_OF_RANGE
message: Client specified an invalid range.
Generic401:
description: Authentication problem with the client request
headers:
Expand All @@ -859,6 +881,22 @@ components:
code: AUTHENTICATION_REQUIRED
message: New authentication is required.
Generic403:
description: Client does not have sufficient permission
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_403_PERMISSION_DENIED:
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
value:
status: 403
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action.
CreateSubscriptionBadRequest403:
description: Client does not have sufficient permission
headers:
x-correlator:
Expand Down Expand Up @@ -896,18 +934,6 @@ components:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
GENERIC_404_DEVICE_NOT_FOUND:
description: Device identifier not found
value:
status: 404
code: DEVICE_NOT_FOUND
message: Device identifier not found.
GENERIC_404_{{SPECIFIC_CODE}}:
description: Specific situation to highlight the resource/concept not found
value:
status: 404
code: { { SPECIFIC_CODE } }
message: { { SPECIFIC_CODE_MESSAGE } }
Generic409:
description: Conflict
headers:
Expand Down

0 comments on commit debe75b

Please sign in to comment.