File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 5
5
version : 1.0.0
6
6
7
7
components :
8
+ securitySchemes :
9
+ bearerAuth :
10
+ type : http
11
+ scheme : bearer
12
+ bearerFormat : JWT
13
+
8
14
schemas :
9
15
Question :
10
16
properties :
93
99
- questions
94
100
summary : Creates a question
95
101
description : Creates a question
102
+ security :
103
+ - bearerAuth : []
96
104
requestBody :
97
105
required : true
98
106
content :
@@ -134,11 +142,13 @@ paths:
134
142
name : page
135
143
type : integer
136
144
required : true
145
+ default : 1
137
146
description : Page of questions to return
138
147
- in : query
139
148
name : qnLimit
140
149
type : integer
141
150
required : true
151
+ default : 10
142
152
description : Limit on number of questions to return
143
153
- in : query
144
154
name : title
@@ -201,6 +211,8 @@ paths:
201
211
- questions
202
212
summary : Updates a question
203
213
description : Updates a question
214
+ security :
215
+ - bearerAuth : []
204
216
parameters :
205
217
- in : path
206
218
name : id
@@ -242,6 +254,8 @@ paths:
242
254
tags :
243
255
- questions
244
256
summary : Deletes a question
257
+ security :
258
+ - bearerAuth : []
245
259
description : Deletes a question
246
260
parameters :
247
261
- in : path
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ definitions:
37
37
required : true
38
38
39
39
components :
40
+ securitySchemes :
41
+ bearerAuth :
42
+ type : http
43
+ scheme : bearer
44
+ bearerFormat : JWT
45
+
40
46
schemas :
41
47
User :
42
48
properties :
@@ -148,6 +154,8 @@ paths:
148
154
tags :
149
155
- users
150
156
summary : Get all users
157
+ security :
158
+ - bearerAuth : []
151
159
responses :
152
160
200 :
153
161
description : Successful Response
@@ -195,6 +203,8 @@ paths:
195
203
required : true
196
204
schema :
197
205
type : string
206
+ security :
207
+ - bearerAuth : []
198
208
requestBody :
199
209
content :
200
210
application/json :
@@ -251,12 +261,37 @@ paths:
251
261
summary : Delete a user account
252
262
tags :
253
263
- users
264
+ security :
265
+ - bearerAuth : []
254
266
parameters :
255
267
- in : path
256
268
name : id
257
269
required : true
258
270
schema :
259
271
type : string
272
+ responses :
273
+ 200 :
274
+ description : Successful Response
275
+ content :
276
+ application/json :
277
+ schema :
278
+ type : object
279
+ properties :
280
+ message :
281
+ type : string
282
+ description : Message
283
+ 404 :
284
+ description : Not Found
285
+ content :
286
+ application/json :
287
+ schema :
288
+ $ref : " #/components/schemas/ErrorResponse"
289
+ 500 :
290
+ description : Internal Server Error
291
+ content :
292
+ application/json :
293
+ schema :
294
+ $ref : " #/components/schemas/ErrorResponse"
260
295
/api/auth/login :
261
296
post :
262
297
summary : Login
@@ -316,6 +351,8 @@ paths:
316
351
summary : Verify token
317
352
tags :
318
353
- auth
354
+ security :
355
+ - bearerAuth : []
319
356
requestBody :
320
357
required : true
321
358
content :
You can’t perform that action at this time.
0 commit comments