refact: openapi splitted into separate files
This commit is contained in:
parent
9ed09500ed
commit
2025bb451f
22 changed files with 443 additions and 435 deletions
73
api/paths/titles.yaml
Normal file
73
api/paths/titles.yaml
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
get:
|
||||
summary: Get titles
|
||||
parameters:
|
||||
- $ref: ../parameters/cursor.yaml
|
||||
- $ref: ../parameters/title_sort.yaml
|
||||
- in: query
|
||||
name: sort_forward
|
||||
schema:
|
||||
type: boolean
|
||||
default: true
|
||||
- in: query
|
||||
name: word
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: status
|
||||
schema:
|
||||
$ref: '../schemas/enums/TitleStatus.yaml'
|
||||
- in: query
|
||||
name: rating
|
||||
schema:
|
||||
type: number
|
||||
format: double
|
||||
- in: query
|
||||
name: release_year
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
- in: query
|
||||
name: release_season
|
||||
schema:
|
||||
$ref: '../schemas/enums/ReleaseSeason.yaml'
|
||||
- in: query
|
||||
name: limit
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default: 10
|
||||
- in: query
|
||||
name: offset
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default: 0
|
||||
- in: query
|
||||
name: fields
|
||||
schema:
|
||||
type: string
|
||||
default: all
|
||||
responses:
|
||||
'200':
|
||||
description: List of titles with cursor
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../schemas/Title.yaml'
|
||||
description: List of titles
|
||||
cursor:
|
||||
$ref: '../schemas/CursorObj.yaml'
|
||||
required:
|
||||
- data
|
||||
- cursor
|
||||
'204':
|
||||
description: No titles found
|
||||
'400':
|
||||
description: Request params are not correct
|
||||
'500':
|
||||
description: Unknown server error
|
||||
Loading…
Add table
Add a link
Reference in a new issue