Skip to content

Commit

Permalink
feat(group): document more error responses (#303)
Browse files Browse the repository at this point in the history
Document some more error responses for group endpoints.
  • Loading branch information
ttshivers authored Apr 15, 2024
1 parent 5f78f2c commit 727235a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
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

0 comments on commit 727235a

Please sign in to comment.