-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.yaml
More file actions
457 lines (457 loc) · 10.5 KB
/
swagger.yaml
File metadata and controls
457 lines (457 loc) · 10.5 KB
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
swagger: '2.0'
info:
contact: {}
title: ITMO Chan
version: 1.0.0
basePath: /api
paths:
/auth/login:
post:
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
schema:
properties:
password:
example: password
type: string
username:
example: username
type: string
type: object
responses:
'200':
description: Login success
headers:
Cache-Control:
type: string
Connection:
type: string
Date:
type: string
Expires:
type: string
Keep-Alive:
type: string
Pragma:
type: string
Transfer-Encoding:
type: string
Vary:
type: string
X-Content-Type-Options:
type: string
X-Frame-Options:
type: string
X-XSS-Protection:
type: string
schema:
properties:
accessToken:
example: >-
eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiJ1c2VybmFtZSIsImlhdCI6MTcwNTcxMzIzMiwiZXhwIjoxNzA1NzE2ODMyfQ.76oJjJwCKDqp_ZUrHcYYPt2q5PDV2JYx7lk3myurXKjC4Ym9lG9Py04ZNCAthfft
type: string
username:
example: username
type: string
type: object
'400':
description: Wrong login or password
headers:
Cache-Control:
type: string
Connection:
type: string
Content-Length:
type: string
Date:
type: string
Expires:
type: string
Pragma:
type: string
Vary:
type: string
X-Content-Type-Options:
type: string
X-Frame-Options:
type: string
X-XSS-Protection:
type: string
schema:
properties:
code:
example: 400
type: number
message:
example: Authorization Error
type: string
type: object
tags:
- Auth
description: Login
operationId: login
summary: Login
/auth/register:
post:
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
schema:
properties:
isuId:
example: null
x-nullable: true
password:
example: password
type: string
username:
example: username
type: string
type: object
responses:
'200':
description: Register success
headers:
Cache-Control:
type: string
Connection:
type: string
Date:
type: string
Expires:
type: string
Keep-Alive:
type: string
Pragma:
type: string
Transfer-Encoding:
type: string
Vary:
type: string
X-Content-Type-Options:
type: string
X-Frame-Options:
type: string
X-XSS-Protection:
type: string
schema:
properties:
accessToken:
example: >-
eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiJ1c2VybmFtZSIsImlhdCI6MTcwNTcxMjk1NSwiZXhwIjoxNzA1NzE2NTU1fQ.vrv9pb-oc-tjMdJhBmgWcIxBH5pQczSXcLws8j3WB-b8pFQ-2XoPb2Glv4cEX9gl
type: string
username:
example: username
type: string
type: object
'400':
description: Error IsuId should be positive
headers:
Cache-Control:
type: string
Connection:
type: string
Content-Length:
type: string
Date:
type: string
Expires:
type: string
Pragma:
type: string
Vary:
type: string
X-Content-Type-Options:
type: string
X-Frame-Options:
type: string
X-XSS-Protection:
type: string
schema:
properties:
code:
example: 400
type: number
message:
example: IsuId should be positive number
type: string
type: object
tags:
- Auth
description: Register
operationId: register
summary: Register
/media/pic/1:
delete:
parameters: []
responses:
'200':
description: ''
tags:
- Media
description: Delete picture
operationId: deletePicture
summary: Delete picture
/media/pic/20:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Media
description: Get picture
operationId: getPicture
summary: Get picture
/media/vid/1:
delete:
parameters: []
responses:
'200':
description: ''
tags:
- Media
description: Delete video
operationId: deleteVideo
summary: Delete video
/media/vid/15:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Media
description: Get video
operationId: getVideo
summary: Get video
/poll/18:
post:
consumes:
- application/json
parameters:
- in: body
name: body
schema:
example:
- 2
items:
example: 2
type: number
type: array
responses:
'200':
description: ''
tags:
- Poll
description: Vote in poll
operationId: voteInPoll
summary: Vote in poll
/poll/19:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Poll
description: Get poll
operationId: getPoll
summary: Get poll
/reactions:
post:
consumes:
- application/json
parameters:
- in: body
name: body
schema:
properties:
commentId:
example: 85
type: number
reaction:
example: kek
type: string
type: object
responses:
'200':
description: ''
tags:
- Reactions
description: Append reaction to comment
operationId: appendReactionToComment
summary: Append reaction to comment
/reactions/66:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Reactions
description: Get reactions
operationId: getReactions
summary: Get reactions
/thread:
post:
consumes:
- multipart/form-data
parameters:
- in: formData
name: comment
type: string
- format: binary
in: formData
name: files
type: string
- in: formData
name: poll
type: string
- in: formData
name: thread
type: string
responses:
'200':
description: ''
tags:
- Thread
description: Add thread
operationId: addThread
summary: Add thread
/thread/55/comments:
get:
parameters:
- in: query
name: offset
type: string
- in: query
name: limit
type: string
responses:
'200':
description: ''
tags:
- Thread
description: Get thread comments with offset and limit
operationId: getThreadCommentsWithOffsetAndLimit
summary: Get thread comments with offset and limit
/thread/60:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Thread
description: Get thread
operationId: getThread
summary: Get thread
/topic:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Topic
description: Get all topics
operationId: getAllTopics
summary: Get all topics
put:
consumes:
- application/json
parameters:
- in: body
name: body
schema:
properties:
description:
example: Mega vazhno
type: string
name:
example: topic432
type: string
type: object
responses:
'200':
description: ''
tags:
- Topic
description: Add topic
operationId: addTopic
summary: Add topic
/topic/1:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Topic
description: Get certain topic
operationId: getCertainTopic
summary: Get certain topic
/topic/4:
delete:
parameters: []
responses:
'200':
description: ''
tags:
- Topic
description: Delete topic
operationId: deleteTopic
summary: Delete topic
/trash:
put:
consumes:
- application/json
parameters:
- in: body
name: body
schema:
properties:
commentId:
example: 66
type: number
reason:
example: Ты не прав
type: string
type: object
responses:
'200':
description: ''
tags:
- Trash
description: Throw in trash
operationId: throwInTrash
summary: Throw in trash
/trash/5:
get:
parameters: []
responses:
'200':
description: ''
tags:
- Trash
description: Get trash of comment
operationId: getTrashOfComment
summary: Get trash of comment
tags:
- name: Auth
- name: Media
- name: Poll
- name: Reactions
- name: Thread
- name: Topic
- name: Trash