diff --git a/src/main/resources/openapi/api.yaml b/src/main/resources/openapi/api.yaml index 3cc79aab..e07dec94 100644 --- a/src/main/resources/openapi/api.yaml +++ b/src/main/resources/openapi/api.yaml @@ -74,6 +74,71 @@ paths: $ref: "#/components/responses/NotFoundOrForbidden" 429: $ref: "#/components/responses/TooManyRequests" + /posts/{postId}/reactions: + get: + summary: リアクションを数件返す + security: + - BearerAuth: [ ] + parameters: + - $ref: "#/components/parameters/postId" + responses: + 200: + description: 成功 + content: + application/json: + schema: + $ref: "#/components/schemas/ReactionResponse" + 401: + $ref: "#/components/responses/Unauthorized" + 403: + $ref: "#/components/responses/Forbidden" + 404: + $ref: "#/components/responses/NotFoundOrForbidden" + 429: + $ref: "#/components/responses/TooManyRequests" + + post: + summary: リアクションを付ける + security: + - BearerAuth: [ ] + parameters: + - $ref: "#/components/parameters/postId" + requestBody: + description: 付けるリアクション + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Reaction" + responses: + 200: + description: 成功 + 401: + $ref: "#/components/responses/Unauthorized" + 403: + $ref: "#/components/responses/Forbidden" + 404: + $ref: "#/components/responses/NotFoundOrForbidden" + 429: + $ref: "#/components/responses/TooManyRequests" + delete: + summary: リアクションを削除する + security: + - BearerAuth: [ ] + parameters: + - $ref: "#/components/parameters/postId" + responses: + 200: + description: 成功 + 401: + $ref: "#/components/responses/Unauthorized" + 403: + $ref: "#/components/responses/Forbidden" + 404: + $ref: "#/components/responses/NotFoundOrForbidden" + 429: + $ref: "#/components/responses/TooManyRequests" + /users/{userName}/posts: get: summary: 権限に応じてユーザーの投稿一覧を返す @@ -421,6 +486,36 @@ components: password: type: string + Reaction: + type: object + properties: + reaction: + type: string + + ReactionResponse: + type: object + properties: + reaction: + type: string + isUnicodeEmoji: + type: boolean + iconUrl: + type: string + accounts: + type: array + items: + $ref: "#/components/schemas/Account" + + Account: + type: object + properties: + screenName: + type: string + iconUrl: + type: string + url: + type: string + securitySchemes: BearerAuth: type: http