-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
243 lines (243 loc) · 7.14 KB
/
swagger.json
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
{
"openapi": "3.0.2",
"info": {
"title": "Crunchyroll Notifier",
"version": "1.0",
"license": {
"name": "MIT",
"url": "https://raw.githubusercontent.com/DiegoVictor/crunchyroll-notifier/main/LICENSE"
}
},
"servers": [
{
"url":"http://localhost:3000/stg"
}
],
"paths": {
"/auth/#": {
"post": {
"tags": ["Authentication"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email", "password"],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"example": {
"email": "johndoe@gmail.com",
"password": "89]Wni!rcK"
}
}
}
},
"responses": {
"200": {
"description": "Authenticated",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"AccessToken": {
"type": "string"
},
"ExpiresIn": {
"type": "string"
},
"IdToken": {
"type": "string"
},
"RefreshToken": {
"type": "string"
},
"TokenType": {
"type": "string"
}
}
},
"example": {
"AccessToken": "eyJraWQ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m1TjRb44rwtmxRApk8ga84DB__4nZVSpo1Uzjnrxy5x6es5JA0nuBrgnNEnoJdtUteuouocfQBuJ6ewCT9MV1S1fKJHS1nutIfZa5zXKyQQXTg.YhO6NJK5we4ixX6H",
"TokenType": "Bearer"
}
}
}
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/rss/process": {
"head": {
"tags": ["RSS"],
"security": [
{
"bearer": []
}
],
"parameters": [
{
"in": "query",
"name": "date",
"required": false,
"schema": {
"type": "string"
},
"example": "2021-11-03T00:00:01.000Z"
}
],
"responses": {
"204": {
"description": "Read episodes from RSS"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
"/animes": {
"get": {
"tags": ["Animes"],
"responses": {
"200": {
"description": "Return active animes",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Anime"
}
},
"example": [
{
"id": "eb6d70fb-a7d3-4bb7-a656-e6362587ee40",
"title": "The Fruit of Evolution: Before I Knew It, My Life Had It Made",
"active": true,
"topic": "TheFruitofEvolutionBeforeIKnewItMyLifeHadItMade"
},
{
"id": "53a9b86a-4bee-46f0-bb7d-70477210d032",
"title": "CARDFIGHT!! VANGUARD overDress",
"active": true,
"topic": "CARDFIGHTVANGUARDoverDress"
}
]
}
}
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
},
"post": {
"tags": ["Animes"],
"security": [
{
"bearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"required": [
"title",
"active"
],
"items": {
"properties": {
"title": {
"type": "string"
},
"active": {
"type": "boolean"
}
}
}
},
"example": [
{
"title": "The Promised Neverland",
"active": true
}
]
}
}
},
"responses": {
"204": {
"description": "Save or reactivate animes and create its topics"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
},
},
"components": {
"schemas": {
"Anime": {
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"active": {
"type": "boolean"
},
"topic": {
"type": "string"
}
}
},
"Error": {
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
},
"responses": {
"InternalServerError": {
"description": "When one non expected error occurs",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"example": {
"code": 500,
"message": "Ops! Something goes wrong, try again later"
}
}
}
}
},
}
}