From 9864b2727173f215f2e1915ef4ce30f399cd2d55 Mon Sep 17 00:00:00 2001 From: Darko Draskovic Date: Tue, 15 Dec 2020 00:20:42 +0100 Subject: [PATCH] NOISSUE - Add missing fields to openapi specs and enclose http codes in single quotes (#1302) * Add req body to token req Signed-off-by: Darko Draskovic * Shorten summaries and add/remove keys Signed-off-by: Darko Draskovic * Add single quotes to html response codes Signed-off-by: Darko Draskovic --- authn/openapi.yml | 24 ++--- bootstrap/openapi.yml | 90 ++++++++-------- certs/openapi.yml | 18 ++-- http/openapi.yml | 13 +-- provision/openapi.yml | 14 +-- readers/openapi.yml | 8 +- things/openapi.yml | 239 +++++++++++++++++++++--------------------- twins/openapi.yml | 60 +++++------ users/openapi.yml | 84 +++++++-------- 9 files changed, 276 insertions(+), 274 deletions(-) diff --git a/authn/openapi.yml b/authn/openapi.yml index d244afbf..2dd7d2a6 100644 --- a/authn/openapi.yml +++ b/authn/openapi.yml @@ -16,15 +16,15 @@ paths: requestBody: $ref: "#/components/requestBodies/KeyRequest" responses: - 201: + '201': description: Issued new key. - 400: + '400': description: Failed due to malformed JSON. - 409: + '409': description: Failed due to using already existing ID. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /keys/{id}: get: @@ -38,13 +38,13 @@ paths: security: - Authorization: [] responses: - 200: + '200': $ref: "#/components/responses/KeyRes" - 400: + '400': description: Failed due to malformed query parameters. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" delete: summary: Revoke API key @@ -57,11 +57,11 @@ paths: security: - Authorization: [] responses: - 204: + '204': description: Key revoked. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" components: diff --git a/bootstrap/openapi.yml b/bootstrap/openapi.yml index 1467a8e2..85558d97 100644 --- a/bootstrap/openapi.yml +++ b/bootstrap/openapi.yml @@ -18,15 +18,15 @@ paths: requestBody: $ref: "#/components/requestBodies/ConfigCreateReq" responses: - 201: + '201': $ref: "#/components/responses/ConfigCreateRes" - 400: + '400': description: Failed due to malformed JSON. - 403: + '403': description: Missing or invalid access token provided. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" get: summary: Retrieves managed configs @@ -44,13 +44,13 @@ paths: - $ref: "#/components/parameters/State" - $ref: "#/components/parameters/Name" responses: - 200: + '200': $ref: "#/components/responses/ConfigListRes" - 400: + '400': description: Failed due to malformed query parameters. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/configs/{configId}: get: @@ -61,13 +61,13 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ConfigId" responses: - 200: + '200': $ref: "#/components/responses/ConfigRes" - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Config does not exist. - 500: + '500': $ref: "#/components/responses/ServiceError" put: summary: Updates config info @@ -83,17 +83,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ConfigUpdateReq" responses: - 200: + '200': description: Config updated. - 400: + '400': description: Failed due to malformed JSON. - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Config does not exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" delete: summary: Removes a Config @@ -106,13 +106,13 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ConfigId" responses: - 204: + '204': description: Config removed. - 400: + '400': description: Failed due to malformed config ID. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/configs/certs/{configId}: patch: @@ -128,17 +128,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ConfigCertUpdateReq" responses: - 200: + '200': description: Config updated. - 400: + '400': description: Failed due to malformed JSON. - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Config does not exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/configs/connections/{configId}: put: @@ -154,17 +154,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ConfigConnUpdateReq" responses: - 200: + '200': description: Config updated. - 400: + '400': description: Failed due to malformed JSON. - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Config does not exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/bootstrap/{externalId}: get: @@ -177,12 +177,12 @@ paths: - $ref: "#/components/parameters/ConfigAuth" - $ref: "#/components/parameters/ExternalId" responses: - 200: + '200': $ref: "#/components/responses/BootstrapConfigRes" - 404: + '404': description: | Failed to retrieve corresponding config. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/bootstrap/secure/{externalId}: get: @@ -195,12 +195,12 @@ paths: - $ref: "#/components/parameters/EncConfigAuth" - $ref: "#/components/parameters/ExternalId" responses: - 200: + '200': $ref: "#/components/responses/BootstrapConfigRes" - 404: + '404': description: | Failed to retrieve corresponding config. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/state/{configId}: put: @@ -216,13 +216,13 @@ paths: requestBody: $ref: '#/components/requestBodies/ConfigStateUpdateReq' responses: - 204: + '204': description: Config removed. - 400: + '400': description: Failed due to malformed config's ID. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" components: diff --git a/certs/openapi.yml b/certs/openapi.yml index c19b9c31..0d4358bb 100644 --- a/certs/openapi.yml +++ b/certs/openapi.yml @@ -16,11 +16,11 @@ paths: requestBody: $ref: "#/components/requestBodies/CertReq" responses: - 201: + '201': description: Created - 400: + '400': description: Failed due to malformed JSON. - 500: + '500': description: Unexpected server-side error ocurred. /certs/{thingID}: get: @@ -33,12 +33,12 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ThingID" responses: - 200: + '200': $ref: "#/components/responses/CertsRes" - 404: + '404': description: | Failed to retrieve corresponding certificate. - 500: + '500': $ref: "#/components/responses/ServiceError" /certs/revoke: delete: @@ -51,12 +51,12 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ThingID" responses: - 200: + '200': $ref: "#/components/responses/RevokeRes" - 404: + '404': description: | Failed to revoke corresponding certificate. - 500: + '500': $ref: "#/components/responses/ServiceError" components: diff --git a/http/openapi.yml b/http/openapi.yml index 6a25b6d3..0ae2b1b7 100644 --- a/http/openapi.yml +++ b/http/openapi.yml @@ -18,17 +18,17 @@ paths: requestBody: $ref: "#/components/requestBodies/MessageReq" responses: - 202: + '202': description: Message is accepted for processing. - 400: + '400': description: Message discarded due to its malformed content. - 403: + '403': description: Message discarded due to missing or invalid credentials. - 404: + '404': description: Message discarded due to invalid channel id. - 415: + '415': description: Message discarded due to invalid or missing content type. - 500: + '500': description: Unexpected server-side error occurred. components: @@ -102,6 +102,7 @@ components: in: header schema: type: string + format: uuid required: true ID: name: id diff --git a/provision/openapi.yml b/provision/openapi.yml index 879d574d..37c21aad 100644 --- a/provision/openapi.yml +++ b/provision/openapi.yml @@ -16,13 +16,13 @@ paths: requestBody: $ref: "#/components/requestBodies/ProvisionReq" responses: - 201: + '201': description: Created - 400: + '400': description: Failed due to malformed JSON. - 403: + '403': description: Unauthorized. - 500: + '500': description: Unexpected server-side error ocurred. get: summary: Gets current mapping. @@ -34,11 +34,11 @@ paths: parameters: - $ref: "#/components/parameters/Authorization" responses: - 200: + '200': $ref: "#/components/responses/ProvisionRes" - 403: + '403': description: Unauthorized. - 500: + '500': description: Unexpected server-side error ocurred. components: diff --git a/readers/openapi.yml b/readers/openapi.yml index 230b629d..7dce988b 100644 --- a/readers/openapi.yml +++ b/readers/openapi.yml @@ -21,13 +21,13 @@ paths: - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/ChanId" responses: - 200: + '200': $ref: "#/components/responses/MessagesPageRes" - 400: + '400': description: Failed due to malformed query parameters. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" components: diff --git a/things/openapi.yml b/things/openapi.yml index bad941b0..2c2cf647 100644 --- a/things/openapi.yml +++ b/things/openapi.yml @@ -18,22 +18,22 @@ paths: requestBody: $ref: "#/components/requestBodies/ThingCreateReq" responses: - 201: + '201': $ref: "#/components/responses/CreateThingRes" - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 409: + '409': description: Entity already exist. - 415: + '415': description: Missing or invalid content type. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" get: - summary: Retrieves managed things + summary: Retrieves things description: | Retrieves a list of managed things. Due to performance concerns, data is retrieved in subsets. The API things must ensure that the entire @@ -50,17 +50,17 @@ paths: - $ref: "#/components/parameters/Direction" - $ref: "#/components/parameters/Metadata" responses: - 200: + '200': $ref: "#/components/responses/ThingsPageRes" - 400: + '400': description: Failed due to malformed query parameters. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: A non-existent entity request. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/bulk: post: @@ -75,15 +75,15 @@ paths: requestBody: $ref: "#/components/requestBodies/ThingsCreateReq" responses: - 201: + '201': description: Things registered. - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/{thingId}: get: @@ -94,15 +94,15 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ThingId" responses: - 200: + '200': $ref: "#/components/responses/ThingRes" - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Thing does not exist. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" put: summary: Updates thing info @@ -118,17 +118,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ThingUpdateReq" responses: - 200: + '200': description: Thing updated. - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Thing does not exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" delete: summary: Removes a thing @@ -141,13 +141,13 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ThingId" responses: - 204: + '204': description: Thing removed. - 400: + '400': description: Failed due to malformed thing's ID. - 401: + '401': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/{thingId}/key: patch: @@ -162,19 +162,19 @@ paths: requestBody: $ref: "#/components/requestBodies/KeyUpdateReq" responses: - 200: + '200': description: Thing key updated. - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Thing does not exist. - 409: + '409': description: Specified key already exists. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels: post: @@ -189,17 +189,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ChannelCreateReq" responses: - 201: + '201': $ref: "#/components/responses/ChannelCreateRes" - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 409: + '409': description: Entity already exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" get: summary: Retrieves managed channels @@ -219,15 +219,15 @@ paths: - $ref: "#/components/parameters/Direction" - $ref: "#/components/parameters/Metadata" responses: - 200: + '200': $ref: "#/components/responses/ChannelsPageRes" - 400: + '400': description: Failed due to malformed query parameters. - 401: + '401': description: Missing or invalid access token provided. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels/bulk: post: @@ -242,17 +242,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ChannelsCreateReq" responses: - 201: + '201': description: Channels registered. - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 409: + '409': description: Entity already exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels/{chanId}: get: @@ -263,17 +263,17 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ChanId" responses: - 200: + '200': $ref: "#/components/responses/ChannelRes" - 400: + '400': description: Failed due to malformed channel's ID. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Channel does not exist. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" put: summary: Updates channel info @@ -289,17 +289,17 @@ paths: requestBody: $ref: "#/components/requestBodies/ChannelCreateReq" responses: - 200: + '200': description: Channel updated. - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Channel does not exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" delete: summary: Removes a channel @@ -312,13 +312,13 @@ paths: - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ChanId" responses: - 204: + '204': description: Channel removed. - 400: + '400': description: Failed due to malformed channel's ID. - 401: + '401': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" /connect: post: @@ -333,71 +333,73 @@ paths: requestBody: $ref: "#/components/requestBodies/ConnCreateReq" responses: - 201: + '201': $ref: "#/components/responses/ConnCreateRes" - 400: + '400': description: Failed due to malformed JSON. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: A non-existent entity request. - 409: + '409': description: Entity already exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /things/{thingId}/channels: get: - summary: Retrieves list of channels connected or not connected to specified thing + summary: List of channels connected to specified thing description: | Retrieves list of channels connected to specified thing with pagination metadata. tags: - channels parameters: + - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ThingId" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Connected" responses: - 200: + '200': $ref: "#/components/responses/ChannelsPageRes" - 400: + '400': description: Failed due to malformed query parameters. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Thing does not exist. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels/{chanId}/things: get: - summary: Retrieves list of things connected or not connected to specified channel + summary: List of things connected to specified channel description: | Retrieves list of things connected to specified channel with pagination metadata. tags: - things parameters: + - $ref: "#/components/parameters/Authorization" - $ref: "#/components/parameters/ChanId" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Connected" responses: - 200: + '200': $ref: "#/components/responses/ThingsPageRes" - 400: + '400': description: Failed due to malformed query parameters. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: A non-existent entity request. - 422: + '422': description: Database can't process request. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels/{chanId}/things/{thingId}: put: @@ -412,15 +414,15 @@ paths: - $ref: "#/components/parameters/ChanId" - $ref: "#/components/parameters/ThingId" responses: - 200: + '200': description: Thing connected. - 400: + '400': description: Failed due to malformed query parameters. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Channel or thing does not exist. - 500: + '500': $ref: "#/components/responses/ServiceError" delete: summary: Disconnects the thing from the channel @@ -434,15 +436,15 @@ paths: - $ref: "#/components/parameters/ChanId" - $ref: "#/components/parameters/ThingId" responses: - 204: + '204': description: Thing disconnected. - 400: + '400': description: Failed due to malformed query parameters. - 401: + '401': description: Missing or invalid access token provided. - 404: + '404': description: Channel or thing does not exist. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels/{chanId}/access: post: @@ -457,15 +459,15 @@ paths: requestBody: $ref: "#/components/requestBodies/IdentityReq" responses: - 200: + '200': $ref: "#/components/responses/AccessGrantedRes" - 401: + '401': description: | Thing and channel are not connected, or thing with specified key doesn't exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /channels/{chanId}/access-by-id: post: @@ -480,15 +482,15 @@ paths: requestBody: $ref: "#/components/requestBodies/AccessByIDReq" responses: - 200: + '200': description: Thing has access to the specified channel. - 401: + '401': description: | Thing and channel are not connected, or thing with specified ID doesn't exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" /identify: post: @@ -501,13 +503,13 @@ paths: requestBody: $ref: "#/components/requestBodies/IdentityReq" responses: - 200: + '200': $ref: "#/components/responses/IdentityRes" - 401: + '401': description: Thing with specified key doesn't exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" @@ -621,8 +623,6 @@ components: ConnectionReqSchema: type: object properties: - key: - $ref: "#/components/schemas/Key" channel_ids: type: array description: Channel IDs. @@ -641,6 +641,7 @@ components: in: header schema: type: string + format: uuid required: true ChanId: name: chanId diff --git a/twins/openapi.yml b/twins/openapi.yml index 89b3904c..ccee5dd7 100644 --- a/twins/openapi.yml +++ b/twins/openapi.yml @@ -18,15 +18,15 @@ paths: requestBody: $ref: "#/components/requestBodies/TwinReq" responses: - 201: + '201': $ref: "#/components/responses/TwinCreateRes" - 400: + '400': description: Failed due to malformed JSON. - 403: + '403': description: Missing or invalid access token provided. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: '#/components/responses/ServiceError' get: @@ -43,13 +43,13 @@ paths: - $ref: '#/components/parameters/Name' - $ref: '#/components/parameters/Metadata' responses: - 200: + '200': $ref: '#/components/responses/TwinsPageRes' - 400: + '400': description: Failed due to malformed query parameters. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: '#/components/responses/ServiceError' /twins/{twinID}: @@ -61,15 +61,15 @@ paths: - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/TwinID' responses: - 200: + '200': $ref: '#/components/responses/TwinRes' - 400: + '400': description: Failed due to malformed twin's ID. - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Twin does not exist. - 500: + '500': $ref: '#/components/responses/ServiceError' put: summary: Updates twin info @@ -84,17 +84,17 @@ paths: requestBody: $ref: '#/components/requestBodies/TwinReq' responses: - 200: + '200': description: Twin updated. - 400: + '400': description: Failed due to malformed twin's ID or malformed JSON. - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Twin does not exist. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: '#/components/responses/ServiceError' delete: summary: Removes a twin @@ -105,15 +105,15 @@ paths: - $ref: '#/components/parameters/Authorization' - $ref: '#/components/parameters/TwinID' responses: - 204: + '204': description: Twin removed. - 400: + '400': description: Failed due to malformed twin's ID. - 403: + '403': description: Missing or invalid access token provided - 404: + '404': description: Twin does not exist. - 500: + '500': $ref: '#/components/responses/ServiceError' /states/{twinID}: @@ -131,15 +131,15 @@ paths: - $ref: '#/components/parameters/Offset' - $ref: '#/components/parameters/Metadata' responses: - 200: + '200': $ref: '#/components/responses/StatesPageRes' - 400: + '400': description: Failed due to malformed query parameters. - 403: + '403': description: Missing or invalid access token provided. - 404: + '404': description: Twin does not exist. - 500: + '500': $ref: '#/components/responses/ServiceError' components: diff --git a/users/openapi.yml b/users/openapi.yml index de7d899d..6d2f0cbf 100644 --- a/users/openapi.yml +++ b/users/openapi.yml @@ -16,15 +16,15 @@ paths: requestBody: $ref: "#/components/requestBodies/UserCreateReq" responses: - 201: + '201': $ref: "#/components/responses/UserCreateRes" - 400: + '400': description: Failed due to malformed JSON. - 409: + '409': description: Failed due to using an existing email address. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" get: summary: Gets info on currently logged in user. @@ -36,13 +36,13 @@ paths: security: - Authorization: [] responses: - 200: + '200': $ref: "#/components/responses/UserRes" - 400: + '400': description: Failed due to malformed query parameters. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" put: summary: Updates info on currently logged in user. @@ -56,15 +56,15 @@ paths: requestBody: $ref: "#/components/requestBodies/UserUpdateReq" responses: - 200: + '200': description: User updated. - 400: + '400': description: Failed due to malformed JSON. - 404: + '404': description: Failed due to non existing user. - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: "#/components/responses/ServiceError" /users/{userId}/groups: get: @@ -79,11 +79,11 @@ paths: - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" responses: - 200: + '200': $ref: '#/components/responses/GroupsRes' - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: '#/components/responses/ServiceError' /groups: post: @@ -97,15 +97,15 @@ paths: requestBody: $ref: '#/components/requestBodies/CreateGroupReq' responses: - 200: + '200': description: Group created. content: application/json: schema: $ref: '#/components/schemas/Group' - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: '#/components/responses/ServiceError' get: summary: Get users groups @@ -116,15 +116,15 @@ paths: security: - Authorization: [] responses: - 200: + '200': description: Groups retrieved. content: application/json: schema: $ref: '#/components/schemas/GroupsPage' - 403: + '403': description: Missing or invalid access token provided. - 500: + '500': $ref: '#/components/responses/ServiceError' /tokens: post: @@ -132,34 +132,34 @@ paths: description: Generates an access token when provided with proper credentials. tags: - users - security: - - Authorization: [] + requestBody: + $ref: "#/components/requestBodies/UserCreateReq" responses: - 201: + '201': description: User authenticated. content: application/json: schema: $ref: '#/components/schemas/Token' - 400: + '400': description: Failed due to malformed JSON. content: application/json: schema: $ref: '#/components/schemas/Error' - 403: + '403': description: Failed due to using invalid credentials. content: application/json: schema: $ref: '#/components/schemas/Error' - 415: + '415': description: Missing or invalid content type. content: application/json: schema: $ref: '#/components/schemas/Error' - 500: + '500': $ref: '#/components/responses/ServiceError' /password/reset-request: post: @@ -174,13 +174,13 @@ paths: requestBody: $ref: '#/components/requestBodies/RequestPasswordReset' responses: - 201: + '201': description: Users link for reseting password. - 400: + '400': description: Failed due to malformed JSON. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: '#/components/responses/ServiceError' /password/reset: put: @@ -194,13 +194,13 @@ paths: requestBody: $ref: '#/components/requestBodies/PasswordReset' responses: - 201: + '201': description: User link . - 400: + '400': description: Failed due to malformed JSON. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: '#/components/responses/ServiceError' /password: patch: @@ -214,13 +214,13 @@ paths: requestBody: $ref: '#/components/requestBodies/PasswordChange' responses: - 201: + '201': description: User link . - 400: + '400': description: Failed due to malformed JSON. - 415: + '415': description: Missing or invalid content type. - 500: + '500': $ref: "#/components/responses/ServiceError" components: