feat: get titles added with all components needed
This commit is contained in:
parent
f24edc5dd7
commit
7fed5ed536
1 changed files with 117 additions and 34 deletions
151
api/openapi.yaml
151
api/openapi.yaml
|
|
@ -5,40 +5,60 @@ info:
|
||||||
servers:
|
servers:
|
||||||
- url: /api/v1
|
- url: /api/v1
|
||||||
paths:
|
paths:
|
||||||
# /title:
|
/title:
|
||||||
# get:
|
get:
|
||||||
# summary: Get titles
|
summary: Get titles
|
||||||
# parameters:
|
parameters:
|
||||||
# - in: query
|
- in: query
|
||||||
# name: query
|
name: word
|
||||||
# schema:
|
schema:
|
||||||
# type: string
|
type: string
|
||||||
# - in: query
|
- in: query
|
||||||
# name: limit
|
name: status
|
||||||
# schema:
|
schema:
|
||||||
# type: integer
|
$ref: '#/components/schemas/TitleStatus'
|
||||||
# default: 10
|
- in: query
|
||||||
# - in: query
|
name: rating
|
||||||
# name: offset
|
schema:
|
||||||
# schema:
|
type: number
|
||||||
# type: integer
|
format: double
|
||||||
# default: 0
|
- in: query
|
||||||
# - in: query
|
name: release_year
|
||||||
# name: fields
|
schema:
|
||||||
# schema:
|
type: integer
|
||||||
# type: string
|
format: int32
|
||||||
# default: all
|
- in: query
|
||||||
# responses:
|
name: release_season
|
||||||
# '200':
|
schema:
|
||||||
# description: List of titles
|
$ref: '#/components/schemas/ReleaseSeason'
|
||||||
# content:
|
- in: query
|
||||||
# application/json:
|
name: limit
|
||||||
# schema:
|
schema:
|
||||||
# type: array
|
type: integer
|
||||||
# items:
|
default: 10
|
||||||
# $ref: '#/components/schemas/Title'
|
- in: query
|
||||||
# '204':
|
name: offset
|
||||||
# description: No titles found
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
- in: query
|
||||||
|
name: fields
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: all
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: List of titles
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Title'
|
||||||
|
'204':
|
||||||
|
description: No titles found
|
||||||
|
'500':
|
||||||
|
description: Unknown server error
|
||||||
|
|
||||||
# /title/{title_id}:
|
# /title/{title_id}:
|
||||||
# get:
|
# get:
|
||||||
|
|
@ -535,8 +555,71 @@ paths:
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
TitleStatus:
|
||||||
|
type: string
|
||||||
|
description: Title status
|
||||||
|
enum:
|
||||||
|
- finished
|
||||||
|
- ongoing
|
||||||
|
- planned
|
||||||
|
ReleaseSeason:
|
||||||
|
type: string
|
||||||
|
description: Title release season
|
||||||
|
enum:
|
||||||
|
- winter
|
||||||
|
- spring
|
||||||
|
- summer
|
||||||
|
- fall
|
||||||
|
UserTitleStatus:
|
||||||
|
type: string
|
||||||
|
description: User's title status
|
||||||
|
enum:
|
||||||
|
- finished
|
||||||
|
- planned
|
||||||
|
- dropped
|
||||||
|
- in-progress
|
||||||
Title:
|
Title:
|
||||||
type: object
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
description: Unique title ID (primary key)
|
||||||
|
example: 1
|
||||||
|
title_names:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
studio_id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
poster_id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
title_status:
|
||||||
|
$ref: '#/components/schemas/TitleStatus'
|
||||||
|
rating:
|
||||||
|
type: number
|
||||||
|
format: double
|
||||||
|
rating_count:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
release_year:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
release_season:
|
||||||
|
$ref: '#/components/schemas/ReleaseSeason'
|
||||||
|
episodes_aired:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
episodes_all:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
episodes_len:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: number
|
||||||
|
format: double
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
User:
|
User:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue