Skip to content

Commit

Permalink
SMQ-2570 - Update user and groups api docs (#2581)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Gateru <[email protected]>
  • Loading branch information
felixgateru authored Dec 11, 2024
1 parent b444046 commit 901ed73
Show file tree
Hide file tree
Showing 16 changed files with 1,805 additions and 713 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,17 @@ jobs:
checks: all
report: false
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'


- name: Run Groups API tests
if: steps.changes.outputs.groups == 'true'
uses: schemathesis/action@v1
with:
schema: api/openapi/groups.yml
base-url: ${{ env.GROUPS_URL }}
checks: all
report: false
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'

- name: Run Clients API tests
if: steps.changes.outputs.clients == 'true'
uses: schemathesis/action@v1
Expand Down
9 changes: 8 additions & 1 deletion api/openapi/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ info:
license:
name: Apache 2.0
url: https://github.com/absmach/supermq/blob/main/LICENSE
version: 0.14.0
version: 0.15.1

servers:
- url: http://localhost:9013
Expand Down Expand Up @@ -88,6 +88,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/clients/configs/{configId}:
get:
operationId: getConfig
Expand Down Expand Up @@ -167,6 +168,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/clients/configs/certs/{configId}:
patch:
operationId: updateConfigCerts
Expand Down Expand Up @@ -199,6 +201,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/clients/configs/connections/{configId}:
put:
operationId: updateConfigConnections
Expand Down Expand Up @@ -230,6 +233,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/clients/bootstrap/{externalId}:
get:
operationId: getBootstrapConfig
Expand All @@ -255,6 +259,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/clients/bootstrap/secure/{externalId}:
get:
operationId: getSecureBootstrapConfig
Expand All @@ -281,6 +286,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/clients/state/{configId}:
put:
operationId: updateConfigState
Expand Down Expand Up @@ -310,6 +316,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/health:
get:
summary: Retrieves service health check info.
Expand Down
5 changes: 4 additions & 1 deletion api/openapi/certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ info:
license:
name: Apache 2.0
url: https://github.com/absmach/supermq/blob/main/LICENSE
version: 0.14.0
version: 0.15.1

servers:
- url: http://localhost:9019
Expand Down Expand Up @@ -53,6 +53,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/certs/{certID}:
get:
operationId: getCert
Expand Down Expand Up @@ -106,6 +107,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/serials/{clientID}:
get:
operationId: getSerials
Expand Down Expand Up @@ -133,6 +135,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/health:
get:
summary: Retrieves service health check info.
Expand Down
29 changes: 29 additions & 0 deletions api/openapi/clients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,35 @@ paths:
"500":
$ref: "#/components/responses/ServiceError"

/{domainID}/clients/roles/available-actions:
get:
operationId: listAvailableActions
tags:
- Roles
summary: Retrieves available actions.
description: |
Retrieves a list of available actions.
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
security:
- bearerAuth: []
responses:
"200":
$ref: "./schemas/roles.yml#/components/responses/ListAvailableActionsRes"
"400":
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"

/health:
get:
summary: Retrieves service health check info.
Expand Down
29 changes: 29 additions & 0 deletions api/openapi/domains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,35 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/domains/roles/available-actions:
get:
operationId: listAvailableActions
tags:
- Roles
summary: Retrieves available actions.
description: |
Retrieves a list of available actions.
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
security:
- bearerAuth: []
responses:
"200":
$ref: "./schemas/roles.yml#/components/responses/ListAvailableActionsRes"
"400":
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"

/health:
get:
Expand Down
Loading

0 comments on commit 901ed73

Please sign in to comment.