Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geofencing: Alignment of errors with Commonalities #223

Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 40 additions & 97 deletions code/API_definitions/geofencing-subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ paths:
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"410":
$ref: "#/components/responses/Generic410"
"429":
$ref: "#/components/responses/Generic429"
"500":
$ref: "#/components/responses/Generic500"
"503":
Expand Down Expand Up @@ -179,15 +175,9 @@ paths:
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/CreateSubscription403"
"409":
$ref: "#/components/responses/Generic409"
"415":
$ref: "#/components/responses/Generic415"
$ref: "#/components/responses/Generic403"
"422":
$ref: "#/components/responses/CreateSubscription422"
maxl2287 marked this conversation as resolved.
Show resolved Hide resolved
"429":
$ref: "#/components/responses/Generic429"
"500":
$ref: "#/components/responses/Generic500"
"503":
Expand Down Expand Up @@ -1086,25 +1076,25 @@ components:
InvalidArgument:
value:
status: 400
code: "INVALID_ARGUMENT"
message: "Client specified an invalid argument, request body or query param"
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param
InvalidProtocol:
value:
status: 400
code: "INVALID_PROTOCOL"
message: "Only HTTP is supported"
code: INVALID_PROTOCOL
message: Only HTTP is supported
InvalidCredential:
value:
status: 400
code: "INVALID_CREDENTIAL"
message: "Only Access token is supported"
code: INVALID_CREDENTIAL
message: Only Access token is supported
InvalidToken:
value:
status: 400
code: "INVALID_TOKEN"
message: "Only bearer token is supported"
code: INVALID_TOKEN
message: Only bearer token is supported
Generic400:
description: Problem with the client request
description: Bad Request
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
Expand All @@ -1114,8 +1104,8 @@ components:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 400
code: "INVALID_ARGUMENT"
message: "Client specified an invalid argument, request body or query param"
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param
Generic401:
description: Authentication problem with the client request
headers:
Expand All @@ -1127,9 +1117,8 @@ components:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 401
code: "UNAUTHENTICATED"
message: "Request not authenticated due to missing, invalid, or expired credentials"

code: UNAUTHENTICATED
message: Request not authenticated due to missing, invalid, or expired credentials.
CreateSubscription403:
description: Client does not have sufficient permission
headers:
Expand All @@ -1143,15 +1132,15 @@ components:
PermissionDenied:
value:
status: 403
code: "PERMISSION_DENIED"
message: "Client does not have sufficient permissions to perform this action"
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action
TokenMismatch:
value:
status: 403
code: "SUBSCRIPTION_MISMATCH"
message: "Inconsistent access token for requested events subscription"
code: SUBSCRIPTION_MISMATCH
message: Inconsistent access token for requested events subscription
Generic403:
description: Client does not have sufficient permission
description: Forbidden
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
Expand All @@ -1161,60 +1150,24 @@ components:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 403
code: "PERMISSION_DENIED"
message: "Client does not have sufficient permissions to perform this action"
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action
Generic404:
description: Resource Not Found
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 404
code: NOT_FOUND
message: "The specified resource is not found"
Generic409:
description: Conflict
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 409
code: CONFLICT
message: "The specified resource is in a conflict"
Generic410:
description: Gone
description: Not found
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 410
code: GONE
message: "The specified resource is no longer available at the requested address"
Generic415:
description: Unsupported Media Type
headers:
X-Correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 415
code: UNSUPPORTED_MEDIA_TYPE
message: "The specified media type is not supported"
examples:
GENERIC_404_NOT_FOUND:
description: Resource is not found
value:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
CreateSubscription422:
maxl2287 marked this conversation as resolved.
Show resolved Hide resolved
description: Unprocessable Entity
headers:
Expand All @@ -1228,21 +1181,8 @@ components:
PermissionDenied:
value:
status: 422
code: "MULTIEVENT_SUBSCRIPTION_NOT_SUPPORTED"
message: "Multi event types subscription not managed"
Generic429:
maxl2287 marked this conversation as resolved.
Show resolved Hide resolved
description: Too Many Requests
headers:
X-Correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 429
code: TOO_MANY_REQUESTS
message: "Endpoint does not support as many requests per time slot"
code: MULTIEVENT_SUBSCRIPTION_NOT_SUPPORTED
message: Multi event types subscription not managed
maxl2287 marked this conversation as resolved.
Show resolved Hide resolved
Generic500:
description: Server error
headers:
Expand All @@ -1254,8 +1194,8 @@ components:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 500
code: "INTERNAL"
message: "Server error"
code: INTERNAL
message: Server error
Generic503:
description: Service unavailable. Typically the server is down.
headers:
Expand All @@ -1265,10 +1205,13 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
example:
status: 503
code: "UNAVAILABLE"
message: "Service unavailable"
examples:
GENERIC_503_UNAVAILABLE:
description: Service is not available. Temporary situation usually related to maintenance process in the server side
value:
status: 503
code: UNAVAILABLE
message: Service Unavailable.
SubscriptionIdRequired:
description: Problem with the client request
headers:
Expand Down