You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/question-service/swagger.yml
+152-5Lines changed: 152 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ definitions:
58
58
properties:
59
59
message:
60
60
type: string
61
-
deescription: Message
61
+
description: Message
62
62
ServerError:
63
63
type: object
64
64
properties:
@@ -124,6 +124,83 @@ paths:
124
124
application/json:
125
125
schema:
126
126
$ref: "#/definitions/ServerError"
127
+
get:
128
+
tags:
129
+
- questions
130
+
summary: Reads a list of questions
131
+
description: Reads a limited list of questions based on current page and question limit per page, taking into account search and filter conditions (if any).
132
+
parameters:
133
+
- in: query
134
+
name: page
135
+
type: integer
136
+
required: true
137
+
description: Page of questions to return
138
+
- in: query
139
+
name: qnLimit
140
+
type: integer
141
+
required: true
142
+
description: Limit on number of questions to return
143
+
- in: query
144
+
name: title
145
+
type: string
146
+
required: false
147
+
description: Question title search keywords
148
+
- in: query
149
+
name: complexities
150
+
schema:
151
+
oneOf:
152
+
- type: string
153
+
- type: array
154
+
items:
155
+
type: string
156
+
required: false
157
+
description: Question complexity filters
158
+
- in: query
159
+
name: categories
160
+
schema:
161
+
oneOf:
162
+
- type: string
163
+
- type: array
164
+
items:
165
+
type: string
166
+
required: false
167
+
description: Question category filters
168
+
responses:
169
+
200:
170
+
description: Successful Response
171
+
content:
172
+
application/json:
173
+
schema:
174
+
type: object
175
+
properties:
176
+
message:
177
+
type: string
178
+
description: Message
179
+
pages:
180
+
type: integer
181
+
description: Total number of pages of questions
182
+
questions:
183
+
type: array
184
+
items:
185
+
$ref: "#/definitions/Question"
186
+
400:
187
+
description: Bad Request
188
+
content:
189
+
application/json:
190
+
schema:
191
+
$ref: "#/definitions/Error"
192
+
404:
193
+
description: Question Not Found
194
+
content:
195
+
application/json:
196
+
schema:
197
+
$ref: "#/definitions/Error"
198
+
500:
199
+
description: Internal Server Error
200
+
content:
201
+
application/json:
202
+
schema:
203
+
$ref: "#/definitions/ServerError"
127
204
/api/questions/{id}:
128
205
put:
129
206
tags:
@@ -155,8 +232,8 @@ paths:
155
232
description: Message
156
233
question:
157
234
$ref: "#/definitions/Question"
158
-
400:
159
-
description: Bad Request
235
+
404:
236
+
description: Question Not Found
160
237
content:
161
238
application/json:
162
239
schema:
@@ -189,8 +266,78 @@ paths:
189
266
message:
190
267
type: string
191
268
description: Message
192
-
400:
193
-
description: Bad Request
269
+
404:
270
+
description: Question Not Found
271
+
content:
272
+
application/json:
273
+
schema:
274
+
$ref: "#/definitions/Error"
275
+
500:
276
+
description: Internal Server Error
277
+
content:
278
+
application/json:
279
+
schema:
280
+
$ref: "#/definitions/ServerError"
281
+
get:
282
+
tags:
283
+
- questions
284
+
summary: Reads a question
285
+
description: Reads a question
286
+
parameters:
287
+
- in: path
288
+
name: id
289
+
type: string
290
+
required: true
291
+
description: Question id
292
+
responses:
293
+
200:
294
+
description: Successful Response
295
+
content:
296
+
application/json:
297
+
schema:
298
+
type: object
299
+
properties:
300
+
message:
301
+
type: string
302
+
description: Message
303
+
question:
304
+
$ref: "#/definitions/Question"
305
+
404:
306
+
description: Question Not Found
307
+
content:
308
+
application/json:
309
+
schema:
310
+
$ref: "#/definitions/Error"
311
+
500:
312
+
description: Internal Server Error
313
+
content:
314
+
application/json:
315
+
schema:
316
+
$ref: "#/definitions/ServerError"
317
+
/api/questions/categories:
318
+
get:
319
+
tags:
320
+
- questions
321
+
summary: Returns question categories
322
+
description: Returns list of unique question categories
0 commit comments