openapi: add users endpoints

This commit is contained in:
juancarmore 2025-06-10 12:50:45 +02:00
parent 082bea9b5e
commit 4d9e5fe81a
6 changed files with 61 additions and 17 deletions

View File

@ -0,0 +1,10 @@
description: New password
required: true
content:
application/json:
schema:
type: object
properties:
secret:
type: newPassword
description: The new password for the user.

View File

@ -0,0 +1,9 @@
description: Successfully changed user password
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: 'Password changed successfully'

View File

@ -14,8 +14,10 @@ paths:
$ref: './paths/internal/auth.yaml#/~1auth~1logout'
/auth/refresh:
$ref: './paths/internal/auth.yaml#/~1auth~1refresh'
/auth/profile:
$ref: './paths/internal/auth.yaml#/~1auth~1profile'
/users/profile:
$ref: './paths/internal/users.yaml#/~1users~1profile'
/users/change-password:
$ref: './paths/internal/users.yaml#/~1users~1change-password'
/preferences/webhooks:
$ref: './paths/internal/global-preferences.yaml#/~1preferences~1webhooks'
/preferences/security:

View File

@ -63,18 +63,3 @@
$ref: '../../components/responses/internal/error-invalid-refresh-token.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
/auth/profile:
get:
operationId: getUserProfile
summary: Get user profile
description: >
Retrieves the profile information of the authenticated user.
tags:
- Internal API - Authentication
security:
- accessTokenCookie: []
responses:
'200':
$ref: '../../components/responses/internal/success-get-profile.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'

View File

@ -0,0 +1,36 @@
/users/profile:
get:
operationId: getUserProfile
summary: Get user profile
description: >
Retrieves the profile information of the authenticated user.
tags:
- Internal API - Users
security:
- accessTokenCookie: []
responses:
'200':
$ref: '../../components/responses/internal/success-get-profile.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
/users/change-password:
post:
operationId: changeUserPassword
summary: Change user password
description: >
Allows the authenticated user to change their password.
tags:
- Internal API - Users
security:
- accessTokenCookie: []
requestBody:
$ref: '../../components/requestBodies/internal/change-password-request.yaml'
responses:
'200':
$ref: '../../components/responses/internal/success-change-password.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'

View File

@ -4,6 +4,8 @@
description: Operations related to managing OpenVidu Meet recordings
- name: Internal API - Authentication
description: Authentication operations
- name: Internal API - Users
description: Operations related to managing users in OpenVidu Meet
- name: Internal API - Global Preferences
description: Operations related to managing global preferences in OpenVidu Meet
- name: Internal API - Rooms