@@ -25,10 +25,10 @@ externalDocs:
25
25
url : https://openparkproject.github.io/OPP-wiki/
26
26
27
27
tags :
28
- - name : user
29
- description : user management
30
28
- name : session
31
29
description : session management
30
+ - name : user
31
+ description : user management
32
32
- name : car
33
33
description : car management
34
34
- name : ticket
@@ -43,7 +43,7 @@ security:
43
43
44
44
paths :
45
45
46
- /sessions :
46
+ /login :
47
47
48
48
post :
49
49
tags :
@@ -81,21 +81,19 @@ paths:
81
81
$ref : ' #/components/responses/NotFoundError'
82
82
security : []
83
83
84
- /sessions/current :
85
-
86
84
get :
87
85
tags :
88
86
- session
89
- summary : Get current logged user
90
- description : Get current logged user
91
- operationId : getCurrentSession
87
+ summary : Get current session (get new token)
88
+ description : Get current session (get new token)
89
+ operationId : getSession
92
90
responses :
93
91
' 200 ' :
94
92
description : Successful operation
95
93
content :
96
94
application/json :
97
95
schema :
98
- $ref : ' #/components/schemas/UserResponse '
96
+ $ref : ' #/components/schemas/SessionResponse '
99
97
' 400 ' :
100
98
$ref : ' #/components/responses/InvalidInputError'
101
99
' 422 ' :
@@ -110,8 +108,49 @@ paths:
110
108
$ref : ' #/components/responses/ForbiddenError'
111
109
' 404 ' :
112
110
$ref : ' #/components/responses/NotFoundError'
111
+ security : []
113
112
114
- delete :
113
+ /register :
114
+
115
+ post :
116
+ tags :
117
+ - session
118
+ summary : Register
119
+ description : Register
120
+ operationId : register
121
+ requestBody :
122
+ description : Register
123
+ content :
124
+ application/json :
125
+ schema :
126
+ $ref : ' #/components/schemas/UserRequest'
127
+ required : true
128
+ responses :
129
+ ' 201 ' :
130
+ description : Registration successful
131
+ content :
132
+ application/json :
133
+ schema :
134
+ $ref : ' #/components/schemas/SessionResponse'
135
+ ' 400 ' :
136
+ $ref : ' #/components/responses/InvalidInputError'
137
+ ' 422 ' :
138
+ $ref : ' #/components/responses/ValidationError'
139
+ ' 500 ' :
140
+ $ref : ' #/components/responses/InternalServerError'
141
+ ' 503 ' :
142
+ $ref : ' #/components/responses/UnexpectedError'
143
+ ' 401 ' :
144
+ $ref : ' #/components/responses/UnauthorizedError'
145
+ ' 403 ' :
146
+ $ref : ' #/components/responses/ForbiddenError'
147
+ ' 404 ' :
148
+ $ref : ' #/components/responses/NotFoundError'
149
+ security : []
150
+
151
+ /logout :
152
+
153
+ post :
115
154
tags :
116
155
- session
117
156
summary : Logout
@@ -143,8 +182,6 @@ paths:
143
182
summary : Get all users
144
183
description : Get all users
145
184
operationId : getUsers
146
- x-required-permissions :
147
- - users:read:all
148
185
parameters :
149
186
- name : limit
150
187
in : query
@@ -187,42 +224,6 @@ paths:
187
224
' 404 ' :
188
225
$ref : ' #/components/responses/NotFoundError'
189
226
190
- post :
191
- tags :
192
- - user
193
- summary : Create a new user (Registration)
194
- description : Create a new user (Registration)
195
- operationId : addUser
196
- requestBody :
197
- description : Create a new user (Registration)
198
- content :
199
- application/json :
200
- schema :
201
- $ref : ' #/components/schemas/UserRequest'
202
- required : true
203
- responses :
204
- ' 201 ' :
205
- description : User created successfully
206
- content :
207
- application/json :
208
- schema :
209
- $ref : ' #/components/schemas/UserResponse'
210
- ' 400 ' :
211
- $ref : ' #/components/responses/InvalidInputError'
212
- ' 422 ' :
213
- $ref : ' #/components/responses/ValidationError'
214
- ' 500 ' :
215
- $ref : ' #/components/responses/InternalServerError'
216
- ' 503 ' :
217
- $ref : ' #/components/responses/UnexpectedError'
218
- ' 401 ' :
219
- $ref : ' #/components/responses/UnauthorizedError'
220
- ' 403 ' :
221
- $ref : ' #/components/responses/ForbiddenError'
222
- ' 404 ' :
223
- $ref : ' #/components/responses/NotFoundError'
224
- security : []
225
-
226
227
delete :
227
228
tags :
228
229
- user
0 commit comments