From 450dc6320b5239006527a1818afbcb01b3c6a78f Mon Sep 17 00:00:00 2001 From: dborovcanin Date: Mon, 29 Apr 2024 14:08:14 +0000 Subject: [PATCH] deploy: 19c1261e814425209553158e4d8cb2095075c032 --- apis/api/openapi/http.yml | 10 ++++---- apis/api/openapi/invitations.yml | 4 +-- apis/api/openapi/notifiers.yml | 43 +++++++++++++++++++++++++++----- apis/api/openapi/things.yml | 12 ++++----- apis/api/openapi/twins.yml | 1 - apis/api/openapi/users.yml | 6 ++++- 6 files changed, 55 insertions(+), 21 deletions(-) diff --git a/apis/api/openapi/http.yml b/apis/api/openapi/http.yml index 7e8f6a2b7f..b755712263 100644 --- a/apis/api/openapi/http.yml +++ b/apis/api/openapi/http.yml @@ -25,7 +25,7 @@ tags: externalDocs: description: Find out more about messages url: https://docs.magistrala.abstractmachines.fr/ - + paths: /channels/{id}/messages: post: @@ -50,7 +50,7 @@ paths: description: Message discarded due to invalid channel id. "415": description: Message discarded due to invalid or missing content type. - '500': + "500": $ref: "#/components/responses/ServiceError" /health: get: @@ -58,9 +58,9 @@ paths: tags: - health responses: - '200': + "200": $ref: "#/components/responses/HealthRes" - '500': + "500": $ref: "#/components/responses/ServiceError" components: @@ -154,7 +154,7 @@ components: responses: ServiceError: description: Unexpected server-side error occurred. - + HealthRes: description: Service Health Check. content: diff --git a/apis/api/openapi/invitations.yml b/apis/api/openapi/invitations.yml index d31f1a9d59..8bc66efe06 100644 --- a/apis/api/openapi/invitations.yml +++ b/apis/api/openapi/invitations.yml @@ -47,7 +47,7 @@ paths: "401": description: Missing or invalid access token provided. "404": - description: A non-existent entity request. + description: A non-existent entity request. "409": description: Failed due to using an existing identity. "415": @@ -111,7 +111,7 @@ paths: "401": description: Missing or invalid access token provided. "404": - description: A non-existent entity request. + description: A non-existent entity request. "500": $ref: "#/components/responses/ServiceError" diff --git a/apis/api/openapi/notifiers.yml b/apis/api/openapi/notifiers.yml index d6e861f7e7..37fd400e47 100644 --- a/apis/api/openapi/notifiers.yml +++ b/apis/api/openapi/notifiers.yml @@ -20,17 +20,18 @@ servers: - url: https://localhost:9014 - url: http://localhost:9015 - url: https://localhost:9015 - + tags: - name: notifiers description: Everything about your Notifiers externalDocs: description: Find out more about notifiers url: https://docs.magistrala.abstractmachines.fr/ - + paths: /subscriptions: post: + operationId: createSubscription summary: Create subscription description: Creates a new subscription give a topic and contact. tags: @@ -42,13 +43,18 @@ paths: $ref: "#/components/responses/Create" "400": description: Failed due to malformed JSON. + "403": + description: Failed to perform authorization over the entity. "409": description: Failed due to using an existing topic and contact. "415": description: Missing or invalid content type. + "422": + description: Database can't process request. "500": $ref: "#/components/responses/ServiceError" get: + operationId: listSubscriptions summary: List subscriptions description: List subscriptions given list parameters. tags: @@ -65,10 +71,17 @@ paths: description: Failed due to malformed query parameters. "401": description: Missing or invalid access token provided. + "403": + description: Failed to perform authorization over the entity. + "404": + description: A non-existent entity request. + "422": + description: Database can't process request. "500": $ref: "#/components/responses/ServiceError" /subscriptions/{id}: get: + operationId: viewSubscription summary: Get subscription with the provided id description: Retrieves a subscription with the provided id. tags: @@ -80,9 +93,16 @@ paths: $ref: "#/components/responses/View" "401": description: Missing or invalid access token provided. + "403": + description: Failed to perform authorization over the entity. + "404": + description: A non-existent entity request. + "422": + description: Database can't process request. "500": $ref: "#/components/responses/ServiceError" delete: + operationId: removeSubscription summary: Delete subscription with the provided id description: Removes a subscription with the provided id. tags: @@ -94,6 +114,12 @@ paths: description: Subscription removed "401": description: Missing or invalid access token provided. + "403": + description: Failed to perform authorization over the entity. + "404": + description: A non-existent entity request. + "422": + description: Database can't process request. "500": $ref: "#/components/responses/ServiceError" /health: @@ -102,9 +128,9 @@ paths: tags: - health responses: - '200': + "200": $ref: "#/components/responses/HealthRes" - '500': + "500": $ref: "#/components/responses/ServiceError" components: @@ -140,7 +166,7 @@ components: contact: type: string example: user@example.com - description: The contact of the user to which the notification will be sent. + description: The contact of the user to which the notification will be sent. Page: type: object properties: @@ -229,6 +255,11 @@ components: application/json: schema: $ref: "#/components/schemas/Subscription" + links: + delete: + operationId: removeSubscription + parameters: + id: $response.body#/id Page: description: Data retrieved. content: @@ -240,7 +271,7 @@ components: HealthRes: description: Service Health Check. content: - application/json: + application/health+json: schema: $ref: "./schemas/HealthInfo.yml" diff --git a/apis/api/openapi/things.yml b/apis/api/openapi/things.yml index 33c71af38b..2f3de8bb9f 100644 --- a/apis/api/openapi/things.yml +++ b/apis/api/openapi/things.yml @@ -94,7 +94,7 @@ paths: description: | Missing or invalid access token provided. "403": - description: Failed to perform authorization over the entity. + description: Failed to perform authorization over the entity. "404": description: A non-existent entity request. "422": @@ -182,7 +182,7 @@ paths: "404": description: Failed due to non existing thing. "409": - description: Failed due to using an existing identity. + description: Failed due to using an existing identity. "415": description: Missing or invalid content type. "422": @@ -299,7 +299,7 @@ paths: "404": description: A non-existent entity request. "409": - description: Failed due to already disabled thing. + description: Failed due to already disabled thing. "422": description: Database can't process request. "500": @@ -329,7 +329,7 @@ paths: "404": description: A non-existent entity request. "409": - description: Failed due to already enabled thing. + description: Failed due to already enabled thing. "422": description: Database can't process request. "500": @@ -595,7 +595,7 @@ paths: "404": description: A non-existent entity request. "409": - description: Failed due to already enabled channel. + description: Failed due to already enabled channel. "422": description: Database can't process request. "500": @@ -625,7 +625,7 @@ paths: "404": description: A non-existent entity request. "409": - description: Failed due to already disabled channel. + description: Failed due to already disabled channel. "422": description: Database can't process request. "500": diff --git a/apis/api/openapi/twins.yml b/apis/api/openapi/twins.yml index 78e9af3e18..04cfeccd50 100644 --- a/apis/api/openapi/twins.yml +++ b/apis/api/openapi/twins.yml @@ -312,7 +312,6 @@ components: twins: type: array minItems: 0 - uniqueItems: true items: $ref: "#/components/schemas/TwinResObj" total: diff --git a/apis/api/openapi/users.yml b/apis/api/openapi/users.yml index 1ec12a7e18..5c6643a561 100644 --- a/apis/api/openapi/users.yml +++ b/apis/api/openapi/users.yml @@ -57,7 +57,7 @@ paths: "415": description: Missing or invalid content type. "422": - description: Database can't process request. + description: Database can't process request. "500": $ref: "#/components/responses/ServiceError" @@ -572,6 +572,8 @@ paths: description: Missing or invalid access token provided. "403": description: Failed to perform authorization over the entity. + "404": + description: A non-existent entity request. "409": description: Failed due to using an existing identity. "415": @@ -695,6 +697,8 @@ paths: description: Missing or invalid access token provided. "403": description: Unauthorized access to group id. + "404": + description: A non-existent entity request. "500": $ref: "#/components/responses/ServiceError"