Skip to content

Commit fb0f381

Browse files
committed
doc: add the new endpoints description
1 parent 061023c commit fb0f381

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

doc/api.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ components:
7171
User:
7272
type: object
7373
properties:
74+
name:
75+
type: string
7476
email:
7577
type: string
7678
password:
@@ -82,11 +84,17 @@ components:
8284
type: string
8385
token:
8486
type: string
87+
refreshToken:
88+
type: string
8589
userId:
8690
type: string
91+
name:
92+
type: string
8793
responses:
8894
UnauthorizedError:
8995
description: Access token is missing or invalid
96+
UnauthenticatedError:
97+
description: Access token is missing, expired or invalid
9098
securitySchemes:
9199
bearerAuth:
92100
type: http
@@ -290,6 +298,28 @@ paths:
290298
description: The user has been deleted
291299
401:
292300
$ref: '#/components/responses/UnauthorizedError'
301+
/users/{id}/tokens:
302+
parameters:
303+
- name: id
304+
description: user id
305+
in: path
306+
required: true
307+
schema:
308+
type: string
309+
get:
310+
tags:
311+
- Users
312+
summary: Get new user tokens
313+
description: Gets new user tokens
314+
responses:
315+
200:
316+
description: Successful operation
317+
content:
318+
application/json:
319+
schema:
320+
$ref: "#/components/schemas/Auth"
321+
403:
322+
$ref: '#/components/responses/UnauthenticatedError'
293323
/users/{id}/words:
294324
parameters:
295325
- name: id
@@ -312,7 +342,7 @@ paths:
312342
type: array
313343
items:
314344
$ref: "#/components/schemas/UserWord"
315-
401:
345+
402:
316346
$ref: '#/components/responses/UnauthorizedError'
317347
/users/{id}/words/{wordId}:
318348
parameters:

0 commit comments

Comments
 (0)