-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yml
125 lines (123 loc) · 3.48 KB
/
openapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
openapi: 3.0.0
info:
title: Movies ListApi
version: v1
paths:
/api/v1/movies/:
get:
description: ""
parameters:
- name: page
in: query
description: Номер страницы
required: false
schema:
type: string
responses:
"200":
description: ""
content:
application/json:
schema:
type: object
properties:
count:
type: integer
description: Количество объектов
example: 1000
total_pages:
type: integer
description: Количество страниц
example: 20
prev:
type: integer
nullable: true
description: Номер предыдущей страницы
example: 1
next:
type: integer
nullable: true
description: Номер следующей страницы
example: 2
results:
type: array
items:
$ref: "#/components/schemas/Movie"
/api/v1/movies/{id}:
get:
description: ""
parameters:
- in: path
name: id
required: true
schema:
type: string
format: uuid
description: ID кинопроизведения
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: "#/components/schemas/Movie"
components:
schemas:
Movie:
type: object
properties:
id:
type: string
format: uuid
description: ID
title:
type: string
description: Название
example: Crescent Star
description:
type: string
description: Описание
example: In 1944, the Germans began rounding up the Jews of Rhodes.
creation_date:
type: string
format: date
description: Дата создания
rating:
type: number
format: float
description: Рейтинг
example: 7.9
type:
type: string
description: Тип
example: movie
genres:
type: array
description: Список жанров
example: [Drama, Short]
items:
type: string
description: Название жанра
actors:
type: array
description: Список актёров
example: [Darrell Geer, Michael Bond]
items:
type: string
description: Имя актёра
directors:
type: array
description: Список режиссеров
example: [Turgut Turk Adiguzel]
items:
type: string
description: Имя режиссера
example: Drama
writers:
type: array
description: Список сценаристов
example: [Turgut Turk Adiguzel]
items:
type: string
description: Имя сценариста
example: Drama