mirror of https://github.com/usbharu/Hideout.git
feat: openapiにpostの定義を書いた
This commit is contained in:
parent
160839a089
commit
de45bcf164
|
@ -0,0 +1,91 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Hideout API
|
||||
description: Hideout API
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: 'https://test-hideout.usbharu.dev/api/internal/v1'
|
||||
paths:
|
||||
/posts:
|
||||
get:
|
||||
summary: 権限に応じて投稿を返す
|
||||
security:
|
||||
- { }
|
||||
- BearerAuth: [ ]
|
||||
responses:
|
||||
200:
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Post"
|
||||
401:
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
403:
|
||||
$ref: "#/components/responses/Forbidden"
|
||||
429:
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
|
||||
components:
|
||||
responses:
|
||||
Unauthorized:
|
||||
description: トークンが無効
|
||||
Forbidden:
|
||||
description: 権限がない
|
||||
NotFound:
|
||||
description: 存在しないか権限がない
|
||||
TooManyRequests:
|
||||
description: レートリミット
|
||||
|
||||
|
||||
schemas:
|
||||
Post:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
readOnly: true
|
||||
userId:
|
||||
type: integer
|
||||
format: int64
|
||||
readOnly: true
|
||||
overview:
|
||||
type: string
|
||||
text:
|
||||
type: string
|
||||
createdAt:
|
||||
type: integer
|
||||
format: int64
|
||||
readOnly: true
|
||||
visibility:
|
||||
type: string
|
||||
enum:
|
||||
- public
|
||||
- unlisted
|
||||
- followers
|
||||
- direct
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
repostId:
|
||||
type: integer
|
||||
format: int64
|
||||
readOnly: true
|
||||
replyId:
|
||||
type: integer
|
||||
format: int64
|
||||
readOnly: true
|
||||
sensitive:
|
||||
type: boolean
|
||||
apId:
|
||||
type: string
|
||||
format: url
|
||||
readOnly: true
|
||||
|
||||
|
||||
securitySchemes:
|
||||
BearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
Loading…
Reference in New Issue