mirror of https://github.com/usbharu/Hideout.git
feat: リアクションのAPI定義を追加
This commit is contained in:
parent
d979dd600e
commit
4474e2beba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue