Skip to content

Commit 875c24c

Browse files
committed
fix
1 parent 4216749 commit 875c24c

File tree

1 file changed

+45
-11
lines changed

1 file changed

+45
-11
lines changed

openapi.yaml

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,43 @@ paths:
317317
'404':
318318
$ref: '#/components/responses/NotFoundError'
319319

320+
/users/me/{otp}:
321+
get:
322+
tags:
323+
- session
324+
summary: Get user associated with OTP
325+
description: Get user associated with the OTP used for totem installation
326+
operationId: getUserByOTP
327+
parameters:
328+
- name: otp
329+
in: path
330+
description: OTP used for totem installation
331+
required: true
332+
schema:
333+
type: string
334+
example: "123456"
335+
responses:
336+
'200':
337+
description: User retrieved successfully
338+
content:
339+
application/json:
340+
schema:
341+
$ref: '#/components/schemas/UserResponse'
342+
'400':
343+
$ref: '#/components/responses/InvalidInputError'
344+
'422':
345+
$ref: '#/components/responses/ValidationError'
346+
'500':
347+
$ref: '#/components/responses/InternalServerError'
348+
'503':
349+
$ref: '#/components/responses/UnexpectedError'
350+
'401':
351+
$ref: '#/components/responses/UnauthorizedError'
352+
'403':
353+
$ref: '#/components/responses/ForbiddenError'
354+
'404':
355+
$ref: '#/components/responses/NotFoundError'
356+
320357
/users/me:
321358

322359
get:
@@ -1462,21 +1499,21 @@ paths:
14621499
'404':
14631500
$ref: '#/components/responses/NotFoundError'
14641501

1465-
/zones/me/{username}:
1502+
/zones/me/{otp}:
14661503
get:
14671504
tags:
14681505
- zone
1469-
summary: Get all zones of the specified user
1470-
description: Get all zones of the specified user
1471-
operationId: getUserZonesByUsername
1506+
summary: Get all zones of the admin that generated the one-time password
1507+
description: Get all zones of the admin that generated the one-time password
1508+
operationId: getUserZonesByOTP
14721509
parameters:
1473-
- name: username
1510+
- name: otp
14741511
in: path
1475-
description: Username of the user to get zones for
1512+
description: One-time password of the user to get zones for
14761513
required: true
14771514
schema:
14781515
type: string
1479-
example: johndoe
1516+
example: admin123
14801517
responses:
14811518
'200':
14821519
description: Successful operation
@@ -2015,14 +2052,11 @@ components:
20152052
otp:
20162053
type: string
20172054
example: "A7F9C2"
2018-
username:
2019-
type: string
2020-
example: "johndoe"
20212055
valid_until:
20222056
type: string
20232057
format: date-time
20242058
example: "2025-06-11T09:45:00Z"
2025-
required: [otp, username, valid_until]
2059+
required: [otp, valid_until]
20262060

20272061
BaseTicket:
20282062
type: object

0 commit comments

Comments
 (0)