mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-14 14:16:15 +01:00
Clarified 404 responses
This commit is contained in:
parent
27d958a2e6
commit
e2d462b57e
1 changed files with 19 additions and 8 deletions
25
api/api.yaml
25
api/api.yaml
|
@ -50,6 +50,8 @@ paths:
|
||||||
description: Update username action successful.
|
description: Update username action successful.
|
||||||
'409':
|
'409':
|
||||||
description: The chosen username is already taken by another user.
|
description: The chosen username is already taken by another user.
|
||||||
|
'404':
|
||||||
|
description: The user does not exist.
|
||||||
|
|
||||||
/users/{user_id}/followers/{follower_uid}:
|
/users/{user_id}/followers/{follower_uid}:
|
||||||
put:
|
put:
|
||||||
|
@ -77,6 +79,8 @@ paths:
|
||||||
description: Follow user action successful.
|
description: Follow user action successful.
|
||||||
'403':
|
'403':
|
||||||
description: The user has no permission perform this action.
|
description: The user has no permission perform this action.
|
||||||
|
'404':
|
||||||
|
description: The user does not exist.
|
||||||
delete:
|
delete:
|
||||||
tags: ["followers"]
|
tags: ["followers"]
|
||||||
summary: Unfollows a user
|
summary: Unfollows a user
|
||||||
|
@ -101,7 +105,7 @@ paths:
|
||||||
'200':
|
'200':
|
||||||
description: Unfollow user action successful.
|
description: Unfollow user action successful.
|
||||||
'404':
|
'404':
|
||||||
description: The user is not followed by the user.
|
description: The user is not followed by follower_uid, or the user does not exist.
|
||||||
|
|
||||||
/users/{user_id}/bans/{ban_uid}:
|
/users/{user_id}/bans/{ban_uid}:
|
||||||
put:
|
put:
|
||||||
|
@ -129,6 +133,8 @@ paths:
|
||||||
description: Ban user action successful.
|
description: Ban user action successful.
|
||||||
'403':
|
'403':
|
||||||
description: The user has no permission to perform this action.
|
description: The user has no permission to perform this action.
|
||||||
|
'404':
|
||||||
|
description: The user does not exist.
|
||||||
|
|
||||||
delete:
|
delete:
|
||||||
tags: ["bans"]
|
tags: ["bans"]
|
||||||
|
@ -172,7 +178,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/uid"
|
$ref: "#/components/schemas/uid"
|
||||||
required: true
|
required: true
|
||||||
description: The user ID of the owner of the photo to add a like to.
|
description: The user ID of the author of the photo to add a like to.
|
||||||
- name: liker_uid
|
- name: liker_uid
|
||||||
in: path
|
in: path
|
||||||
schema:
|
schema:
|
||||||
|
@ -191,7 +197,7 @@ paths:
|
||||||
'403':
|
'403':
|
||||||
description: The user has no permission to perform this action.
|
description: The user has no permission to perform this action.
|
||||||
'404':
|
'404':
|
||||||
description: The photo does not exists, or the author of the photo has banned the user.
|
description: The user or the photo does not exists (or the author of the photo has banned the authorized user).
|
||||||
delete:
|
delete:
|
||||||
tags: ["likes"]
|
tags: ["likes"]
|
||||||
summary: Unlikes a photo
|
summary: Unlikes a photo
|
||||||
|
@ -205,7 +211,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/uid"
|
$ref: "#/components/schemas/uid"
|
||||||
required: true
|
required: true
|
||||||
description: The user ID of the owner of the photo to remove a like from.
|
description: The user ID of the author of the photo to remove a like from.
|
||||||
- name: liker_uid
|
- name: liker_uid
|
||||||
in: path
|
in: path
|
||||||
schema:
|
schema:
|
||||||
|
@ -222,7 +228,7 @@ paths:
|
||||||
'200':
|
'200':
|
||||||
description: Unlike photo action successful.
|
description: Unlike photo action successful.
|
||||||
'404':
|
'404':
|
||||||
description: The photo does not exists or the user was not liking the photo.
|
description: The user or photo does not exists, or the user is not liking the photo.
|
||||||
|
|
||||||
/users/{user_id}:
|
/users/{user_id}:
|
||||||
get:
|
get:
|
||||||
|
@ -263,6 +269,7 @@ paths:
|
||||||
$ref: "#/components/schemas/user_photo_stream"
|
$ref: "#/components/schemas/user_photo_stream"
|
||||||
'404':
|
'404':
|
||||||
description: User not found (or the authorized user is banned).
|
description: User not found (or the authorized user is banned).
|
||||||
|
|
||||||
/users/{user_id}/photos:
|
/users/{user_id}/photos:
|
||||||
post:
|
post:
|
||||||
tags: ["photos"]
|
tags: ["photos"]
|
||||||
|
@ -286,6 +293,8 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'201':
|
'201':
|
||||||
description: Upload photo action successful.
|
description: Upload photo action successful.
|
||||||
|
'404':
|
||||||
|
description: User not found (or the authorized user is banned).
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}:
|
/users/{user_id}/photos/{photo_id}:
|
||||||
get:
|
get:
|
||||||
|
@ -316,7 +325,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
format: binary
|
format: binary
|
||||||
'404':
|
'404':
|
||||||
description: Photo not found (or the user is banned by the owner of the photo).
|
description: User or photo not found (or the authorized user is banned by the author of the photo).
|
||||||
delete:
|
delete:
|
||||||
tags: ["photos"]
|
tags: ["photos"]
|
||||||
summary: Deletes a photo
|
summary: Deletes a photo
|
||||||
|
@ -342,6 +351,8 @@ paths:
|
||||||
description: Delete photo action successful.
|
description: Delete photo action successful.
|
||||||
'401':
|
'401':
|
||||||
description: The user has no permission to delete that photo.
|
description: The user has no permission to delete that photo.
|
||||||
|
'404':
|
||||||
|
description: User or photo not found.
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/comments:
|
/users/{user_id}/photos/{photo_id}/comments:
|
||||||
post:
|
post:
|
||||||
|
@ -376,7 +387,7 @@ paths:
|
||||||
'200':
|
'200':
|
||||||
description: Comment photo action successful.
|
description: Comment photo action successful.
|
||||||
'404':
|
'404':
|
||||||
description: The photo does not exists (or the author of the photo has banned the user).
|
description: The user or the photo does not exists (or the author of the photo has banned the authorized user).
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/comments/{comment_id}:
|
/users/{user_id}/photos/{photo_id}/comments/{comment_id}:
|
||||||
delete:
|
delete:
|
||||||
|
|
Loading…
Reference in a new issue