openapi: refactor authentication and user schemas to streamline properties

This commit is contained in:
juancarmore 2025-05-31 01:32:37 +02:00
parent 36cae89b37
commit 610c5276b0
2 changed files with 16 additions and 31 deletions

View File

@ -3,23 +3,11 @@ properties:
authentication:
$ref: '#/AuthenticationPreferences'
description: Preferences for authentication.
roomCreationPolicy:
$ref: '#/RoomCreationPolicy'
description: Preferences for room creation policy.
AuthenticationPreferences:
type: object
properties:
authMode:
type: string
enum:
- none
- moderators_only
- all_users
default: none
example: none
description: The authentication mode to enter a room.
method:
authMethod:
type: object
properties:
type:
@ -29,17 +17,12 @@ AuthenticationPreferences:
default: single-user
example: single-user
description: The authentication method to use.
RoomCreationPolicy:
type: object
properties:
allowRoomCreation:
type: boolean
default: true
example: true
description: If true, users will be allowed to create rooms.
requireAuthentication:
type: boolean
default: true
example: true
description: If true, users will be required to authenticate before creating rooms.
authModeToAccessRoom:
type: string
enum:
- none
- moderators_only
- all_users
default: none
example: none
description: The authentication mode to access a room.

View File

@ -4,7 +4,9 @@ properties:
type: string
example: 'admin'
description: The username of the authenticated user.
role:
type: string
example: 'admin'
description: The role assigned to the authenticated user.
roles:
type: array
items:
type: string
example: ['admin', 'user']
description: A list of roles assigned to the authenticated user.