Skip to content

Commit

Permalink
update yml listings
Browse files Browse the repository at this point in the history
Signed-off-by: Musilah <[email protected]>
  • Loading branch information
Musilah authored and rodneyosodo committed Feb 13, 2024
1 parent e77d4ea commit 137fd44
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 56 deletions.
32 changes: 31 additions & 1 deletion api/openapi/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,37 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/domains/{domainID}/users:
get:
summary: List users assigned to domain
description: |
List users assigned to domain that is identified by the domain ID.
tags:
- Domains
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Metadata"
- $ref: "#/components/parameters/Status"
security:
- bearerAuth: []
responses:
"200":
$ref: "#/components/responses/UserPageRes"
description: List of users assigned to domain.
"400":
description: Failed due to malformed domain's ID.
"401":
description: Missing or invalid access token provided.
"403":
description: Unauthorized access the domain ID.
"404":
description: A non-existent entity request.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/domains/{domainID}/users/unassign:
post:
summary: Unassign users from domain
Expand Down
56 changes: 16 additions & 40 deletions api/openapi/things.yml
Original file line number Diff line number Diff line change
Expand Up @@ -661,68 +661,44 @@ paths:
"500":
$ref: "#/components/responses/ServiceError"

/things/{thingID}/channels:
get:
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/ThingID"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
responses:
"200":
$ref: "#/components/responses/ChannelPageRes"
"400":
description: Failed due to malformed query parameters.
"401":
description: Missing or invalid access token provided.
"404":
description: Thing does not exist.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/users/{memberID}/channels:
/channels/{memberID}/groups:
get:
summary: List of channels connected to specified user
summary: Get group associated with the member
description: |
Retrieves list of channels connected to specified user with pagination
metadata.
Gets groups associated with the channel member specified by id.
tags:
- Channels
- Groups
parameters:
- $ref: "#/components/parameters/MemberID"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Metadata"
- $ref: "#/components/parameters/Status"
- $ref: "#/components/parameters/Tags"
security:
- bearerAuth: []
responses:
"200":
$ref: "#/components/responses/ChannelPageRes"
$ref: "#/components/responses/GroupPageRes"
"400":
description: Failed due to malformed query parameters.
"401":
description: Missing or invalid access token provided.
"404":
description: Thing does not exist.
"422":
description: Database can't process request.
description: Group does not exist.
"500":
$ref: "#/components/responses/ServiceError"

/groups/{memberID}/channels:
/things/{thingID}/channels:
get:
summary: List of channels connected to specified group
summary: List of channels connected to specified thing
description: |
Retrieves list of channels connected to specified group with pagination
Retrieves list of channels connected to specified thing with pagination
metadata.
tags:
- Channels
parameters:
- $ref: "#/components/parameters/MemberID"
- $ref: "#/components/parameters/ThingID"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
responses:
Expand Down
51 changes: 36 additions & 15 deletions api/openapi/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -812,33 +812,54 @@ paths:
description: Group does not exist.
"500":
$ref: "#/components/responses/ServiceError"
/domains/{domainID}/users:

/users/{memberID}/channels:
get:
summary: List users assigned to domain
summary: List of channels connected to specified user
description: |
List users assigned to domain that is identified by the domain ID.
Retrieves list of channels connected to specified user with pagination
metadata.
tags:
- Domains
- Channels
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/MemberID"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
responses:
"200":
$ref: "#/components/responses/ChannelPageRes"
"400":
description: Failed due to malformed query parameters.
"401":
description: Missing or invalid access token provided.
"404":
description: Thing does not exist.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"

/groups/{memberID}/channels:
get:
summary: List of channels connected to specified group
description: |
Retrieves list of channels connected to specified group with pagination
metadata.
tags:
- Channels
parameters:
- $ref: "#/components/parameters/MemberID"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Metadata"
- $ref: "#/components/parameters/Status"
security:
- bearerAuth: []
- $ref: "#/components/parameters/Limit"
responses:
"200":
$ref: "#/components/responses/UserPageRes"
description: List of users assigned to domain.
$ref: "#/components/responses/ChannelPageRes"
"400":
description: Failed due to malformed domain's ID.
description: Failed due to malformed query parameters.
"401":
description: Missing or invalid access token provided.
"403":
description: Unauthorized access the domain ID.
"404":
description: A non-existent entity request.
description: Thing does not exist.
"422":
description: Database can't process request.
"500":
Expand Down

0 comments on commit 137fd44

Please sign in to comment.