mirror of https://github.com/usbharu/Hideout.git
feat: エラーのレスポンス定義を追加
This commit is contained in:
parent
e21fc00eae
commit
8480d473e6
|
@ -250,6 +250,8 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Application"
|
||||
422:
|
||||
$ref: "#/components/responses/unprocessableEntity"
|
||||
|
||||
/api/v1/accounts/verify_credentials:
|
||||
get:
|
||||
|
@ -265,6 +267,12 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CredentialAccount"
|
||||
401:
|
||||
$ref: "#/components/responses/unauthorized"
|
||||
403:
|
||||
$ref: "#/components/responses/forbidden"
|
||||
422:
|
||||
$ref: "#/components/responses/unprocessableEntity"
|
||||
|
||||
/api/v1/accounts:
|
||||
post:
|
||||
|
@ -282,6 +290,10 @@ paths:
|
|||
responses:
|
||||
200:
|
||||
description: 成功
|
||||
401:
|
||||
$ref: "#/components/responses/unauthorized"
|
||||
429:
|
||||
$ref: "#/components/responses/rateLimited"
|
||||
|
||||
/api/v1/accounts/relationships:
|
||||
get:
|
||||
|
@ -354,6 +366,10 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Account"
|
||||
401:
|
||||
$ref: "#/components/responses/unauthorized"
|
||||
404:
|
||||
$ref: "#/components/responses/notfound"
|
||||
|
||||
/api/v1/accounts/{id}/follow:
|
||||
post:
|
||||
|
@ -617,6 +633,11 @@ paths:
|
|||
items:
|
||||
$ref: "#/components/schemas/Status"
|
||||
|
||||
401:
|
||||
$ref: "#/components/responses/unauthorized"
|
||||
404:
|
||||
$ref: "#/components/responses/notfound"
|
||||
|
||||
/api/v1/timelines/public:
|
||||
get:
|
||||
tags:
|
||||
|
@ -2698,6 +2719,81 @@ components:
|
|||
- created_at
|
||||
- account
|
||||
|
||||
UnprocessableEntityResponse:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
|
||||
UnauthorizedResponse:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
default: "The access token is invalid"
|
||||
required:
|
||||
- error
|
||||
|
||||
RateLimitedResponse:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
default: "Too many requests"
|
||||
required:
|
||||
- error
|
||||
|
||||
ForbiddenResponse:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
required:
|
||||
- error
|
||||
|
||||
NotFoundResponse:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
required:
|
||||
- error
|
||||
|
||||
responses:
|
||||
forbidden:
|
||||
description: forbidden
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ForbiddenResponse"
|
||||
unprocessableEntity:
|
||||
description: Unprocessable entity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UnprocessableEntityResponse"
|
||||
|
||||
unauthorized:
|
||||
description: Unauthorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UnauthorizedResponse"
|
||||
|
||||
rateLimited:
|
||||
description: Too many requests
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RateLimitedResponse"
|
||||
|
||||
notfound:
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/NotFoundResponse"
|
||||
|
||||
securitySchemes:
|
||||
OAuth2:
|
||||
type: oauth2
|
||||
|
|
Loading…
Reference in New Issue