Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MG-2053 - Update OpenAPI endpoints #2076

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion api/openapi/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ paths:
dataset is consumed either by making subsequent requests, or by
increasing the subset size of the initial request.
parameters:
- $ref: "users.yml#/components/parameters/MemberID"
- $ref: "#/components/parameters/MemberID"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Metadata"
Expand Down Expand Up @@ -767,6 +767,15 @@ components:
schema:
type: string
required: false
MemberID:
name: memberID
description: Unique member identifier.
in: path
schema:
type: string
format: uuid
required: true
example: bb7edb32-2eac-4aad-aebe-ed96fe073879

requestBodies:
DomainCreateReq:
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
12 changes: 11 additions & 1 deletion api/openapi/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ paths:
tags:
- Domains
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/DomainID"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Metadata"
Expand Down Expand Up @@ -1606,6 +1606,16 @@ components:
required: true
example: bb7edb32-2eac-4aad-aebe-ed96fe073879

DomainID:
name: domainID
description: Unique domain identifier.
in: path
schema:
type: string
format: uuid
required: true
example: bb7edb32-2eac-4aad-aebe-ed96fe073879

MemberID:
name: memberID
description: Unique member identifier.
Expand Down
Loading