mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-14 14:16:15 +01:00
Fix: replaced error with status in responses
This commit is contained in:
parent
3c7e03f2af
commit
f896e9ab48
1 changed files with 30 additions and 30 deletions
60
doc/api.yaml
60
doc/api.yaml
|
@ -81,7 +81,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
|
|
||||||
/users/{user_id}/followers:
|
/users/{user_id}/followers:
|
||||||
get:
|
get:
|
||||||
|
@ -121,7 +121,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
/users/{user_id}/following:
|
/users/{user_id}/following:
|
||||||
get:
|
get:
|
||||||
tags: ["followers"]
|
tags: ["followers"]
|
||||||
|
@ -161,7 +161,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
|
|
||||||
/users/{user_id}/followers/{follower_uid}:
|
/users/{user_id}/followers/{follower_uid}:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -200,7 +200,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Forbidden"
|
status: "Forbidden"
|
||||||
'404':
|
'404':
|
||||||
description: The resource does not exist.
|
description: The resource does not exist.
|
||||||
content:
|
content:
|
||||||
|
@ -208,7 +208,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
'400':
|
'400':
|
||||||
description: Trying to follow a user that does not exist.
|
description: Trying to follow a user that does not exist.
|
||||||
content:
|
content:
|
||||||
|
@ -216,7 +216,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
delete:
|
delete:
|
||||||
tags: ["followers"]
|
tags: ["followers"]
|
||||||
summary: Unfollows a user
|
summary: Unfollows a user
|
||||||
|
@ -234,7 +234,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
|
|
||||||
/users/{user_id}/bans/{ban_uid}:
|
/users/{user_id}/bans/{ban_uid}:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -267,7 +267,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Forbidden"
|
status: "Forbidden"
|
||||||
'404':
|
'404':
|
||||||
description: The user does not exist.
|
description: The user does not exist.
|
||||||
content:
|
content:
|
||||||
|
@ -275,7 +275,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
|
|
||||||
delete:
|
delete:
|
||||||
tags: ["bans"]
|
tags: ["bans"]
|
||||||
|
@ -294,7 +294,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Forbidden"
|
status: "Forbidden"
|
||||||
'404':
|
'404':
|
||||||
description: The user is not banned by the user.
|
description: The user is not banned by the user.
|
||||||
content:
|
content:
|
||||||
|
@ -302,7 +302,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "User not found"
|
status: "User not found"
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/likes:
|
/users/{user_id}/photos/{photo_id}/likes:
|
||||||
get:
|
get:
|
||||||
|
@ -361,7 +361,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/likes/{liker_uid}:
|
/users/{user_id}/photos/{photo_id}/likes/{liker_uid}:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -400,7 +400,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Forbidden"
|
status: "Forbidden"
|
||||||
'404':
|
'404':
|
||||||
description: Resource not found (or the author of the photo has banned the authorized user).
|
description: Resource not found (or the author of the photo has banned the authorized user).
|
||||||
content:
|
content:
|
||||||
|
@ -408,7 +408,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
'400':
|
'400':
|
||||||
description: Bad URI (maybe liker_uid is invalid).
|
description: Bad URI (maybe liker_uid is invalid).
|
||||||
content:
|
content:
|
||||||
|
@ -416,7 +416,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Bad photo_id"
|
status: "Bad photo_id"
|
||||||
delete:
|
delete:
|
||||||
tags: ["likes"]
|
tags: ["likes"]
|
||||||
summary: Unlikes a photo
|
summary: Unlikes a photo
|
||||||
|
@ -434,7 +434,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
/users:
|
/users:
|
||||||
get:
|
get:
|
||||||
tags: ["search"]
|
tags: ["search"]
|
||||||
|
@ -486,7 +486,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
'400':
|
'400':
|
||||||
description: Some parameters are malformed.
|
description: Some parameters are malformed.
|
||||||
content:
|
content:
|
||||||
|
@ -494,7 +494,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Invalid start_index or limit value"
|
status: "Invalid start_index or limit value"
|
||||||
'401':
|
'401':
|
||||||
description: The user is not logged in.
|
description: The user is not logged in.
|
||||||
content:
|
content:
|
||||||
|
@ -502,7 +502,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Unauthorized"
|
status: "Unauthorized"
|
||||||
|
|
||||||
/users/{user_id}:
|
/users/{user_id}:
|
||||||
get:
|
get:
|
||||||
|
@ -539,7 +539,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
|
|
||||||
/users/{user_id}/photos:
|
/users/{user_id}/photos:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -584,7 +584,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
'400':
|
'400':
|
||||||
description: Bad request, there is an error in one of the parameters.
|
description: Bad request, there is an error in one of the parameters.
|
||||||
content:
|
content:
|
||||||
|
@ -592,7 +592,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Invalid limit or start_index"
|
status: "Invalid limit or start_index"
|
||||||
|
|
||||||
post:
|
post:
|
||||||
tags: ["photos"]
|
tags: ["photos"]
|
||||||
|
@ -624,7 +624,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}:
|
/users/{user_id}/photos/{photo_id}:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -664,7 +664,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
delete:
|
delete:
|
||||||
tags: ["photos"]
|
tags: ["photos"]
|
||||||
summary: Deletes a photo
|
summary: Deletes a photo
|
||||||
|
@ -682,7 +682,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Unauthorized"
|
status: "Unauthorized"
|
||||||
'404':
|
'404':
|
||||||
description: User or photo not found.
|
description: User or photo not found.
|
||||||
content:
|
content:
|
||||||
|
@ -690,7 +690,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/comments:
|
/users/{user_id}/photos/{photo_id}/comments:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -751,7 +751,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
post:
|
post:
|
||||||
tags: ["comments"]
|
tags: ["comments"]
|
||||||
summary: Comments a photo
|
summary: Comments a photo
|
||||||
|
@ -777,7 +777,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
|
|
||||||
/users/{user_id}/photos/{photo_id}/comments/{comment_id}:
|
/users/{user_id}/photos/{photo_id}/comments/{comment_id}:
|
||||||
delete:
|
delete:
|
||||||
|
@ -816,7 +816,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Unauthorized"
|
status: "Unauthorized"
|
||||||
'404':
|
'404':
|
||||||
description: The comment does not exists.
|
description: The comment does not exists.
|
||||||
content:
|
content:
|
||||||
|
@ -824,7 +824,7 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/generic_response"
|
$ref: "#/components/schemas/generic_response"
|
||||||
example:
|
example:
|
||||||
error: "Resource not found"
|
status: "Resource not found"
|
||||||
|
|
||||||
/stream: # todo review path
|
/stream: # todo review path
|
||||||
get:
|
get:
|
||||||
|
|
Loading…
Reference in a new issue