From 8480d473e6127e00ee5f19cf0fdaaf3c42ece8d9 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sun, 18 Feb 2024 16:29:16 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E3=83=AC=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9=E5=AE=9A=E7=BE=A9?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/openapi/mastodon.yaml | 96 ++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/src/main/resources/openapi/mastodon.yaml b/src/main/resources/openapi/mastodon.yaml index 7f36741c..74cf55fa 100644 --- a/src/main/resources/openapi/mastodon.yaml +++ b/src/main/resources/openapi/mastodon.yaml @@ -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