openapi: add endpoints and schemas for rooms appearance configuration

This commit is contained in:
juancarmore 2025-09-19 11:34:25 +02:00
parent 5cdf4370bf
commit 22a1f23639
7 changed files with 121 additions and 13 deletions

View File

@ -0,0 +1,6 @@
description: New rooms appearance config
required: true
content:
application/json:
schema:
$ref: '../../schemas/internal/rooms-appearance-config.yaml'

View File

@ -0,0 +1,8 @@
description: Rooms appearance configuration not defined
content:
application/json:
schema:
$ref: '../../schemas/error.yaml'
example:
error: 'Global Config Error'
message: Rooms appearance configuration not defined

View File

@ -0,0 +1,5 @@
description: Successfully retrieved rooms appearance config
content:
application/json:
schema:
$ref: '../../schemas/internal/rooms-appearance-config.yaml'

View File

@ -0,0 +1,9 @@
description: Successfully updated rooms appearance config
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: 'Rooms appearance config updated successfully'

View File

@ -0,0 +1,62 @@
type: object
properties:
appearance:
$ref: '#/MeetAppearanceConfig'
description: Config for rooms appearance.
MeetAppearanceConfig:
type: object
properties:
themes:
type: array
description: Array of available themes for rooms
minItems: 1
maxItems: 1
items:
$ref: '#/MeetRoomTheme'
required:
- themes
MeetRoomTheme:
type: object
properties:
name:
type: string
description: Display name of the theme
minLength: 1
maxLength: 50
example: "Default Theme"
baseTheme:
$ref: '#/MeetRoomThemeMode'
description: Base theme mode (light or dark)
backgroundColor:
type: string
description: Background color in hex format
pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'
example: "#FFFFFF"
primaryColor:
type: string
description: Primary color in hex format
pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'
example: "#FF0000"
secondaryColor:
type: string
description: Secondary color in hex format
pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'
example: "#00FF00"
surfaceColor:
type: string
description: Surface color in hex format
pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'
example: "#CCCCCC"
required:
- name
- baseTheme
MeetRoomThemeMode:
type: string
enum:
- light
- dark
description: Theme mode for rooms appearance
example: dark

View File

@ -26,8 +26,8 @@ paths:
$ref: './paths/internal/meet-global-config.yaml#/~1config~1webhooks~1test'
/config/security:
$ref: './paths/internal/meet-global-config.yaml#/~1config~1security'
/config/appearance:
$ref: './paths/internal/meet-global-config.yaml#/~1config~1appearance'
/config/rooms/appearance:
$ref: './paths/internal/meet-global-config.yaml#/~1config~1rooms~1appearance'
/rooms/{roomId}/recording-token:
$ref: './paths/internal/rooms.yaml#/~1rooms~1{roomId}~1recording-token'
/rooms/{roomId}/roles:

View File

@ -96,28 +96,46 @@
'500':
$ref: '../../components/responses/internal-server-error.yaml'
/config/appearance:
/config/rooms/appearance:
get:
operationId: getAppearanceConfig
summary: Get appearance config
operationId: getRoomsAppearanceConfig
summary: Get rooms appearance config
description: >
Retrieves the appearance config for the OpenVidu Meet application.
Retrieves the appearance config for rooms in the OpenVidu Meet application.
tags:
- Internal API - Global Config
security:
- accessTokenCookie: []
responses:
'202':
$ref: '../../components/responses/pro-feature-error.yaml'
'200':
$ref: '../../components/responses/internal/success-get-appearance-config.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
'403':
$ref: '../../components/responses/forbidden-error.yaml'
'404':
$ref: '../../components/responses/internal/error-appearance-config-not-defined.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
put:
operationId: updateAppearanceConfig
summary: Update appearance config
operationId: updateRoomsAppearanceConfig
summary: Update rooms appearance config
description: >
Updates the appearance config for the OpenVidu Meet application.
Updates the appearance config for rooms in the OpenVidu Meet application.
tags:
- Internal API - Global Config
security:
- accessTokenCookie: []
requestBody:
$ref: '../../components/requestBodies/internal/update-appearance-config.yaml'
responses:
'202':
$ref: '../../components/responses/pro-feature-error.yaml'
'200':
$ref: '../../components/responses/internal/success-update-appearance-config.yaml'
'401':
$ref: '../../components/responses/unauthorized-error.yaml'
'403':
$ref: '../../components/responses/forbidden-error.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'