@@ -38,6 +38,25 @@ paths:
38
38
refreshToken :
39
39
type : string
40
40
example : <token>
41
+ 400 :
42
+ description : User already exists
43
+ content :
44
+ application/json :
45
+ schema :
46
+ type : object
47
+ properties :
48
+ status :
49
+ type : integer
50
+ example : 400
51
+ message :
52
+ type : string
53
+ example : User with same email already exists.
54
+ 500 :
55
+ description : Unknown error
56
+ content :
57
+ application/json :
58
+ schema :
59
+ $ref : ' #/components/schemas/UnknownErr'
41
60
42
61
/login :
43
62
post :
@@ -68,7 +87,25 @@ paths:
68
87
refreshToken :
69
88
type : string
70
89
example : <token>
71
-
90
+ 404 :
91
+ description : User not found
92
+ content :
93
+ application/json :
94
+ schema :
95
+ type : object
96
+ properties :
97
+ status :
98
+ type : integer
99
+ example : 404
100
+ message :
101
+ type : string
102
+ example : User not found or wrong password
103
+ 500 :
104
+ description : Unknown error
105
+ content :
106
+ application/json :
107
+ schema :
108
+ $ref : ' #/components/schemas/UnknownErr'
72
109
/api/events :
73
110
get :
74
111
summary : Get events for the authenticated user
@@ -89,6 +126,12 @@ paths:
89
126
type : array
90
127
items :
91
128
$ref : ' #/components/schemas/Events'
129
+ 500 :
130
+ description : Unknown error
131
+ content :
132
+ application/json :
133
+ schema :
134
+ $ref : ' #/components/schemas/UnknownErr'
92
135
post :
93
136
summary : Create a new event
94
137
security :
@@ -127,6 +170,12 @@ paths:
127
170
message :
128
171
type : string
129
172
example : Event created
173
+ 500 :
174
+ description : Unknown error
175
+ content :
176
+ application/json :
177
+ schema :
178
+ $ref : ' #/components/schemas/UnknownErr'
130
179
delete :
131
180
summary : Delete an event
132
181
security :
@@ -151,6 +200,12 @@ paths:
151
200
status :
152
201
type : integer
153
202
example : 204
203
+ 500 :
204
+ description : Unknown error
205
+ content :
206
+ application/json :
207
+ schema :
208
+ $ref : ' #/components/schemas/UnknownErr'
154
209
/api/logout :
155
210
post :
156
211
summary : Logout a user
@@ -177,6 +232,12 @@ paths:
177
232
message :
178
233
type : string
179
234
example : User logged out
235
+ 500 :
236
+ description : Unknown error
237
+ content :
238
+ application/json :
239
+ schema :
240
+ $ref : ' #/components/schemas/UnknownErr'
180
241
/refreshToken :
181
242
post :
182
243
summary : Refresh access token
@@ -200,6 +261,12 @@ paths:
200
261
example : 200
201
262
accessToken :
202
263
type : string
264
+ 500 :
265
+ description : Unknown error
266
+ content :
267
+ application/json :
268
+ schema :
269
+ $ref : ' #/components/schemas/UnknownErr'
203
270
204
271
components :
205
272
schemas :
@@ -246,6 +313,15 @@ components:
246
313
userId :
247
314
type : string
248
315
format : objectId
316
+ UnknownErr :
317
+ type : object
318
+ properties :
319
+ status :
320
+ type : integer
321
+ example : 500
322
+ message :
323
+ type : string
324
+ example : Unknown error
249
325
250
326
securitySchemes :
251
327
bearerAuth :
0 commit comments