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

feat(group): document more error responses #303

Merged
merged 1 commit into from
Apr 15, 2024
Merged
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
6 changes: 5 additions & 1 deletion openapi/components/paths/groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,11 @@ paths:
'200':
description: OK
'400':
description: User <displayName> is already invited
$ref: ../responses/groups/GroupInviteBadRequestError.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
'403':
$ref: ../responses/groups/GroupInviteForbiddenError.yaml
'404':
$ref: ../responses/groups/GroupNotFoundError.yaml
security:
Expand Down Expand Up @@ -652,6 +654,8 @@ paths:
responses:
'200':
$ref: ../responses/groups/GroupMemberListResponse.yaml
'400':
$ref: ../responses/groups/GroupJoinRequestResponseBadRequestError.yaml
'403':
$ref: ../responses/groups/GroupNotMemberError.yaml
'404':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Bad request error response when creating a group invite.
content:
application/json:
schema:
$ref: ../../schemas/Error.yaml
examples:
Group Member Already Exists:
value:
error:
message: User <displayName> is already a member of this group.
status_code: 400
User Already Invited:
value:
error:
message: User <displayName> is already invited.
status_code: 400
11 changes: 11 additions & 0 deletions openapi/components/responses/groups/GroupInviteForbiddenError.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: Forbidden error response when creating a group invite.
content:
application/json:
schema:
$ref: ../../schemas/Error.yaml
examples:
Forbidden to Invite User:
value:
error:
message: You can't invite that user․
status_code: 403
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: Bad request error response when responding to a group join request
content:
application/json:
schema:
$ref: ../../schemas/Error.yaml
examples:
User Join Request Not Exist:
value:
error:
message: You can't accept a join request for a user who hasn't requested to join․
status_code: 400
Loading