Skip to content

Commit 901ed73

Browse files
authored
SMQ-2570 - Update user and groups api docs (#2581)
Signed-off-by: Felix Gateru <[email protected]>
1 parent b444046 commit 901ed73

File tree

16 files changed

+1805
-713
lines changed

16 files changed

+1805
-713
lines changed

.github/workflows/api-tests.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,17 @@ jobs:
152152
checks: all
153153
report: false
154154
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'
155-
155+
156+
- name: Run Groups API tests
157+
if: steps.changes.outputs.groups == 'true'
158+
uses: schemathesis/action@v1
159+
with:
160+
schema: api/openapi/groups.yml
161+
base-url: ${{ env.GROUPS_URL }}
162+
checks: all
163+
report: false
164+
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'
165+
156166
- name: Run Clients API tests
157167
if: steps.changes.outputs.clients == 'true'
158168
uses: schemathesis/action@v1

api/openapi/bootstrap.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ info:
1313
license:
1414
name: Apache 2.0
1515
url: https://github.com/absmach/supermq/blob/main/LICENSE
16-
version: 0.14.0
16+
version: 0.15.1
1717

1818
servers:
1919
- url: http://localhost:9013
@@ -88,6 +88,7 @@ paths:
8888
description: Database can't process request.
8989
"500":
9090
$ref: "#/components/responses/ServiceError"
91+
9192
/{domainID}/clients/configs/{configId}:
9293
get:
9394
operationId: getConfig
@@ -167,6 +168,7 @@ paths:
167168
description: Database can't process request.
168169
"500":
169170
$ref: "#/components/responses/ServiceError"
171+
170172
/{domainID}/clients/configs/certs/{configId}:
171173
patch:
172174
operationId: updateConfigCerts
@@ -199,6 +201,7 @@ paths:
199201
description: Database can't process request.
200202
"500":
201203
$ref: "#/components/responses/ServiceError"
204+
202205
/{domainID}/clients/configs/connections/{configId}:
203206
put:
204207
operationId: updateConfigConnections
@@ -230,6 +233,7 @@ paths:
230233
description: Database can't process request.
231234
"500":
232235
$ref: "#/components/responses/ServiceError"
236+
233237
/clients/bootstrap/{externalId}:
234238
get:
235239
operationId: getBootstrapConfig
@@ -255,6 +259,7 @@ paths:
255259
description: Database can't process request.
256260
"500":
257261
$ref: "#/components/responses/ServiceError"
262+
258263
/clients/bootstrap/secure/{externalId}:
259264
get:
260265
operationId: getSecureBootstrapConfig
@@ -281,6 +286,7 @@ paths:
281286
description: Database can't process request.
282287
"500":
283288
$ref: "#/components/responses/ServiceError"
289+
284290
/{domainID}/clients/state/{configId}:
285291
put:
286292
operationId: updateConfigState
@@ -310,6 +316,7 @@ paths:
310316
description: Database can't process request.
311317
"500":
312318
$ref: "#/components/responses/ServiceError"
319+
313320
/health:
314321
get:
315322
summary: Retrieves service health check info.

api/openapi/certs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ info:
1313
license:
1414
name: Apache 2.0
1515
url: https://github.com/absmach/supermq/blob/main/LICENSE
16-
version: 0.14.0
16+
version: 0.15.1
1717

1818
servers:
1919
- url: http://localhost:9019
@@ -53,6 +53,7 @@ paths:
5353
description: Database can't process request.
5454
"500":
5555
$ref: "#/components/responses/ServiceError"
56+
5657
/{domainID}/certs/{certID}:
5758
get:
5859
operationId: getCert
@@ -106,6 +107,7 @@ paths:
106107
description: Database can't process request.
107108
"500":
108109
$ref: "#/components/responses/ServiceError"
110+
109111
/{domainID}/serials/{clientID}:
110112
get:
111113
operationId: getSerials
@@ -133,6 +135,7 @@ paths:
133135
description: Database can't process request.
134136
"500":
135137
$ref: "#/components/responses/ServiceError"
138+
136139
/health:
137140
get:
138141
summary: Retrieves service health check info.

api/openapi/clients.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,35 @@ paths:
867867
"500":
868868
$ref: "#/components/responses/ServiceError"
869869

870+
/{domainID}/clients/roles/available-actions:
871+
get:
872+
operationId: listAvailableActions
873+
tags:
874+
- Roles
875+
summary: Retrieves available actions.
876+
description: |
877+
Retrieves a list of available actions.
878+
parameters:
879+
- $ref: "auth.yml#/components/parameters/DomainID"
880+
security:
881+
- bearerAuth: []
882+
responses:
883+
"200":
884+
$ref: "./schemas/roles.yml#/components/responses/ListAvailableActionsRes"
885+
"400":
886+
description: Failed due to malformed query parameters.
887+
"401":
888+
description: |
889+
Missing or invalid access token provided.
890+
"403":
891+
description: Failed to perform authorization over the entity.
892+
"404":
893+
description: A non-existent entity request.
894+
"422":
895+
description: Database can't process request.
896+
"500":
897+
$ref: "#/components/responses/ServiceError"
898+
870899
/health:
871900
get:
872901
summary: Retrieves service health check info.

api/openapi/domains.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,35 @@ paths:
637637
description: Database can't process request.
638638
"500":
639639
$ref: "#/components/responses/ServiceError"
640+
641+
/domains/roles/available-actions:
642+
get:
643+
operationId: listAvailableActions
644+
tags:
645+
- Roles
646+
summary: Retrieves available actions.
647+
description: |
648+
Retrieves a list of available actions.
649+
parameters:
650+
- $ref: "auth.yml#/components/parameters/DomainID"
651+
security:
652+
- bearerAuth: []
653+
responses:
654+
"200":
655+
$ref: "./schemas/roles.yml#/components/responses/ListAvailableActionsRes"
656+
"400":
657+
description: Failed due to malformed query parameters.
658+
"401":
659+
description: |
660+
Missing or invalid access token provided.
661+
"403":
662+
description: Failed to perform authorization over the entity.
663+
"404":
664+
description: A non-existent entity request.
665+
"422":
666+
description: Database can't process request.
667+
"500":
668+
$ref: "#/components/responses/ServiceError"
640669

641670
/health:
642671
get:

0 commit comments

Comments
 (0)