diff --git a/backend/openapi/components/requestBodies/internal/update-room-request.yaml b/backend/openapi/components/requestBodies/internal/update-room-request.yaml deleted file mode 100644 index 2d7f424..0000000 --- a/backend/openapi/components/requestBodies/internal/update-room-request.yaml +++ /dev/null @@ -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 diff --git a/backend/openapi/components/requestBodies/update-room-preferences-request.yaml b/backend/openapi/components/requestBodies/update-room-preferences-request.yaml new file mode 100644 index 0000000..2da1ea1 --- /dev/null +++ b/backend/openapi/components/requestBodies/update-room-preferences-request.yaml @@ -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 diff --git a/backend/openapi/components/responses/internal/success-get-room-preferences.yaml b/backend/openapi/components/responses/internal/success-get-room-preferences.yaml deleted file mode 100644 index 13c13f7..0000000 --- a/backend/openapi/components/responses/internal/success-get-room-preferences.yaml +++ /dev/null @@ -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 diff --git a/backend/openapi/components/responses/internal/success-update-room.yaml b/backend/openapi/components/responses/internal/success-update-room.yaml deleted file mode 100644 index 6d38ffc..0000000 --- a/backend/openapi/components/responses/internal/success-update-room.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: Success response for updating a room -content: - application/json: - schema: - $ref: '../../schemas/meet-room.yaml' diff --git a/backend/openapi/components/responses/success-get-room-preferences.yaml b/backend/openapi/components/responses/success-get-room-preferences.yaml new file mode 100644 index 0000000..167c48c --- /dev/null +++ b/backend/openapi/components/responses/success-get-room-preferences.yaml @@ -0,0 +1,5 @@ +description: Success response for retrieving the room preferences +content: + application/json: + schema: + $ref: '../schemas/meet-room-preferences.yaml#/MeetRoomPreferences' diff --git a/backend/openapi/components/responses/success-update-room-preferences.yaml b/backend/openapi/components/responses/success-update-room-preferences.yaml new file mode 100644 index 0000000..3b5305c --- /dev/null +++ b/backend/openapi/components/responses/success-update-room-preferences.yaml @@ -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 diff --git a/backend/openapi/openvidu-meet-api.yaml b/backend/openapi/openvidu-meet-api.yaml index 29bd27f..725d6e1 100644 --- a/backend/openapi/openvidu-meet-api.yaml +++ b/backend/openapi/openvidu-meet-api.yaml @@ -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: diff --git a/backend/openapi/openvidu-meet-internal-api.yaml b/backend/openapi/openvidu-meet-internal-api.yaml index 7682b92..3db313d 100644 --- a/backend/openapi/openvidu-meet-internal-api.yaml +++ b/backend/openapi/openvidu-meet-internal-api.yaml @@ -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: diff --git a/backend/openapi/paths/internal/rooms.yaml b/backend/openapi/paths/internal/rooms.yaml index 0bb2a39..509bf65 100644 --- a/backend/openapi/paths/internal/rooms.yaml +++ b/backend/openapi/paths/internal/rooms.yaml @@ -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 diff --git a/backend/openapi/paths/rooms.yaml b/backend/openapi/paths/rooms.yaml index fb62a9d..71a88ec 100644 --- a/backend/openapi/paths/rooms.yaml +++ b/backend/openapi/paths/rooms.yaml @@ -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' diff --git a/backend/openapi/tags/tags.yaml b/backend/openapi/tags/tags.yaml index dcbb408..0c942b0 100644 --- a/backend/openapi/tags/tags.yaml +++ b/backend/openapi/tags/tags.yaml @@ -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