openapi: refactor authentication and user schemas to streamline properties
This commit is contained in:
parent
36cae89b37
commit
610c5276b0
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user