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