Skip to content

Commit

Permalink
feat(friends): document more friend endpoint error responses
Browse files Browse the repository at this point in the history
Document more friend endpoint error responses
  • Loading branch information
ttshivers committed Apr 15, 2024
1 parent 3541a77 commit e08693f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openapi/components/paths/friends.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ paths:
responses:
'200':
$ref: ../responses/notifications/NotificationResponse.yaml
'400':
$ref: ../responses/friends/FriendBadRequestError.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
'404':
Expand Down
16 changes: 16 additions & 0 deletions openapi/components/responses/friends/FriendBadRequestError.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Bad request error response when sending a friend request
content:
application/json:
schema:
$ref: ../../schemas/Error.yaml
examples:
Users Already Friends:
value:
error:
message: Users are already friends
status_code: 400
Already Sent a Friend Request:
value:
error:
message: This user has already been sent a friend request
status_code: 400

0 comments on commit e08693f

Please sign in to comment.