feat: エラーのレスポンス定義を追加

This commit is contained in:
usbharu 2024-02-23 11:36:40 +09:00
parent 32a4315952
commit 0b0d7c02f1
1 changed files with 28 additions and 0 deletions

View File

@ -328,6 +328,10 @@ paths:
type: array
items:
$ref: "#/components/schemas/Relationship"
401:
$ref: "#/components/responses/unauthorized"
422:
$ref: "#/components/responses/unprocessableEntity"
/api/v1/accounts/update_credentials:
patch:
@ -349,6 +353,10 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Account"
401:
$ref: "#/components/responses/unauthorized"
422:
$ref: "#/components/responses/unprocessableEntity"
/api/v1/accounts/{id}:
get:
@ -777,6 +785,11 @@ paths:
type: array
items:
$ref: "#/components/schemas/Status"
206:
$ref: "#/components/responses/partialContent"
401:
$ref: "#/components/responses/unauthorized"
/api/v1/media:
post:
tags:
@ -2862,6 +2875,14 @@ components:
required:
- error
PartialContentResponse:
type: object
properties:
error:
type: string
required:
- error
responses:
forbidden:
description: forbidden
@ -2897,6 +2918,13 @@ components:
schema:
$ref: "#/components/schemas/NotFoundResponse"
partialContent:
description: Partial content
content:
application/json:
schema:
$ref: "#/components/schemas/PartialContentResponse"
securitySchemes:
OAuth2:
type: oauth2