Skip to content

Commit

Permalink
fix ref paths
Browse files Browse the repository at this point in the history
Signed-off-by: Musilah <[email protected]>
  • Loading branch information
Musilah committed Mar 22, 2024
1 parent afe81c7 commit 3938dec
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 69 deletions.
45 changes: 12 additions & 33 deletions api/openapi/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,37 +286,7 @@ 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 Expand Up @@ -462,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 @@ -650,7 +620,7 @@ components:
]
relation:
type: string
enum: ["administrator", "editor", "viewer", "member"]
enum: ["administrator", "editor","viewer","member"]
example: "administrator"
description: Policy relations.
required:
Expand Down Expand Up @@ -797,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
61 changes: 25 additions & 36 deletions api/openapi/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -812,54 +812,33 @@ paths:
description: Group does not exist.
"500":
$ref: "#/components/responses/ServiceError"

/users/{memberID}/channels:
/domains/{domainID}/users:
get:
summary: List of channels connected to specified user
summary: List users assigned to domain
description: |
Retrieves list of channels connected to specified user with pagination
metadata.
List users assigned to domain that is identified by the domain ID.
tags:
- Channels
- Domains
parameters:
- $ref: "#/components/parameters/MemberID"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/DomainID"
- $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/Limit"
- $ref: "#/components/parameters/Metadata"
- $ref: "#/components/parameters/Status"
security:
- bearerAuth: []
responses:
"200":
$ref: "#/components/responses/ChannelPageRes"
$ref: "#/components/responses/UserPageRes"
description: List of users assigned to domain.
"400":
description: Failed due to malformed query parameters.
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: Thing does not exist.
description: A non-existent entity request.
"422":
description: Database can't process request.
"500":
Expand Down Expand Up @@ -1463,6 +1442,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

0 comments on commit 3938dec

Please sign in to comment.