openapi: restructure room preferences API endpoints and update request/response schemas

This commit is contained in:
juancarmore 2025-08-27 20:15:48 +02:00
parent 6b0df53614
commit ec7f2a483f
11 changed files with 96 additions and 119 deletions

View File

@ -1,33 +0,0 @@
description: New room preferences
content:
application/json:
schema:
$ref: '../../schemas/meet-room-preferences.yaml#/MeetRoomPreferences'
examples:
default:
summary: Standard preferences
value:
chatPreferences:
enabled: true
recordingPreferences:
enabled: true
virtualBackgroundPreferences:
enabled: true
withoutRecording:
summary: Room with recording disabled
value:
chatPreferences:
enabled: true
recordingPreferences:
enabled: false
virtualBackgroundPreferences:
enabled: true
withoutChat:
summary: Room with chat disabled
value:
chatPreferences:
enabled: false
recordingPreferences:
enabled: true
virtualBackgroundPreferences:
enabled: true

View File

@ -0,0 +1,16 @@
description: New room preferences
content:
application/json:
schema:
type: object
properties:
preferences:
$ref: '../schemas/meet-room-preferences.yaml#/MeetRoomPreferences'
example:
preferences:
chatPreferences:
enabled: true
recordingPreferences:
enabled: false
virtualBackgroundPreferences:
enabled: true

View File

@ -1,16 +0,0 @@
description: Success response for retrieving the room preferences
content:
application/json:
schema:
$ref: '../../schemas/meet-room-preferences.yaml'
examples:
complete_room_details:
summary: Room preferences response
value:
preferences:
chatPreferences:
enabled: true
recordingPreferences:
enabled: false
virtualBackgroundPreferences:
enabled: true

View File

@ -1,5 +0,0 @@
description: Success response for updating a room
content:
application/json:
schema:
$ref: '../../schemas/meet-room.yaml'

View File

@ -0,0 +1,5 @@
description: Success response for retrieving the room preferences
content:
application/json:
schema:
$ref: '../schemas/meet-room-preferences.yaml#/MeetRoomPreferences'

View File

@ -0,0 +1,10 @@
description: Success response for updating room preferences
content:
application/json:
schema:
type: object
properties:
message:
type: string
example:
message: Room preferences for room 'room-123' updated successfully

View File

@ -13,6 +13,8 @@ paths:
$ref: './paths/rooms.yaml#/~1rooms'
/rooms/{roomId}:
$ref: './paths/rooms.yaml#/~1rooms~1{roomId}'
/rooms/{roomId}/preferences:
$ref: './paths/rooms.yaml#/~1rooms~1{roomId}~1preferences'
/recordings:
$ref: './paths/recordings.yaml#/~1recordings'
/recordings/download:

View File

@ -28,8 +28,6 @@ paths:
$ref: './paths/internal/global-preferences.yaml#/~1preferences~1security'
/preferences/appearance:
$ref: './paths/internal/global-preferences.yaml#/~1preferences~1appearance'
/rooms/{roomId}/preferences:
$ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}~1preferences'
/rooms/{roomId}/recording-token:
$ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}~1recording-token'
/rooms/{roomId}/roles:

View File

@ -1,31 +1,3 @@
/rooms/{roomId}/preferences:
get:
operationId: getRoomPreferences
summary: Get room preferences
description: >
Retrieves the preferences of an OpenVidu Meet room with the specified room ID.
tags:
- Internal API - Rooms
security:
- participantTokenCookie: []
parameters:
- $ref: '../../components/parameters/room-id-path.yaml'
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
responses:
'200':
$ref: '../../components/responses/internal/success-get-room-preferences.yaml'
'400':
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
'403':
$ref: '../../components/responses/forbidden-error.yaml'
'404':
$ref: '../../components/responses/error-room-not-found.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
/rooms/{roomId}/recording-token:
post:
operationId: generateRecordingToken

View File

@ -6,7 +6,7 @@
Creates a new OpenVidu Meet room.
The room will be available for participants to join using the generated URLs.
tags:
- OpenVidu Meet - Room
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
@ -23,7 +23,6 @@
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
get:
operationId: getRooms
summary: Get all rooms
@ -31,7 +30,7 @@
Retrieves a paginated list of all rooms available in the system.
You can apply filters to narrow down the results based on specific criteria.
tags:
- OpenVidu Meet - Room
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
@ -51,7 +50,6 @@
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: bulkDeleteRooms
summary: Bulk delete rooms
@ -64,7 +62,7 @@
If the "force" parameter is set to true, all rooms will be deleted immediately
regardless of active participants.
tags:
- OpenVidu Meet - Room
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
@ -95,7 +93,7 @@
description: >
Retrieves the details of an OpenVidu Meet room with the specified room ID.
tags:
- OpenVidu Meet - Room
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
@ -119,33 +117,6 @@
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
put:
operationId: updateRoom
summary: Update a room
description: >
Updates the preferences of an OpenVidu Meet room with the specified room ID.
tags:
- OpenVidu Meet - Room
security:
- accessTokenCookie: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
requestBody:
$ref: '../components/requestBodies/internal/update-room-request.yaml'
responses:
'200':
$ref: '../components/responses/internal/success-update-room.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
delete:
operationId: deleteRoom
summary: Delete a room
@ -158,7 +129,7 @@
If the "force" parameter is set to true, the room will be deleted immediately
regardless of active participants.
tags:
- OpenVidu Meet - Room
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
@ -180,3 +151,60 @@
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
/rooms/{roomId}/preferences:
get:
operationId: getRoomPreferences
summary: Get room preferences
description: >
Retrieves the preferences of an OpenVidu Meet room with the specified room ID.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
- participantTokenCookie: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
- $ref: '../components/parameters/internal/x-participant-role.yaml'
responses:
'200':
$ref: '../components/responses/success-get-room-preferences.yaml'
'400':
$ref: '../components/responses/internal/error-invalid-participant-role.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'
put:
operationId: updateRoomPreferences
summary: Update room preferences
description: >
Updates the preferences of an OpenVidu Meet room with the specified room ID.
tags:
- OpenVidu Meet - Rooms
security:
- apiKeyInHeader: []
- accessTokenCookie: []
parameters:
- $ref: '../components/parameters/room-id-path.yaml'
requestBody:
$ref: '../components/requestBodies/update-room-preferences-request.yaml'
responses:
'200':
$ref: '../components/responses/success-update-room-preferences.yaml'
'401':
$ref: '../components/responses/unauthorized-error.yaml'
'403':
$ref: '../components/responses/forbidden-error.yaml'
'404':
$ref: '../components/responses/error-room-not-found.yaml'
'422':
$ref: '../components/responses/validation-error.yaml'
'500':
$ref: '../components/responses/internal-server-error.yaml'

View File

@ -1,4 +1,4 @@
- name: OpenVidu Meet - Room
- name: OpenVidu Meet - Rooms
description: Operations related to managing OpenVidu Meet rooms
- name: OpenVidu Meet - Recordings
description: Operations related to managing OpenVidu Meet recordings