openapi: add x-participant-role header parameter and error response for invalid roles. Update related paths to include role validation.
This commit is contained in:
parent
fdd897b86b
commit
82592e1f6c
@ -0,0 +1,12 @@
|
||||
name: x-participant-role
|
||||
in: header
|
||||
description: |
|
||||
The role of the participant in the meeting. It can be one of the following values:
|
||||
- `moderator`: Can manage the room and its participants.
|
||||
- `publisher`: Can publish media streams to the room.
|
||||
|
||||
This is required to distinguish roles when multiple are present in the participant token
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum: ['moderator', 'publisher']
|
||||
@ -1,9 +1,9 @@
|
||||
name: x-signature
|
||||
in: header
|
||||
description: >
|
||||
HMAC-SHA256 signature of the request body, created using your webhook secret.
|
||||
HMAC-SHA256 signature of the request body, created using your webhook secret.
|
||||
|
||||
Use this to verify the webhook came from OpenVidu Meet and wasn't tampered with.
|
||||
Use this to verify the webhook came from OpenVidu Meet and wasn't tampered with.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
type: string
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
name: x-timestamp
|
||||
in: header
|
||||
description: >
|
||||
Unix timestamp (in seconds) when the webhook was sent.
|
||||
Unix timestamp (in seconds) when the webhook was sent.
|
||||
|
||||
Can be used to validate webhook age and prevent replay attacks.
|
||||
Can be used to validate webhook age and prevent replay attacks.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
description: Invalid participant role provided
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../schemas/error.yaml'
|
||||
example:
|
||||
error: Participant Error
|
||||
message: 'No valid participant role provided'
|
||||
@ -3,7 +3,7 @@ properties:
|
||||
role:
|
||||
type: string
|
||||
enum: ['moderator', 'publisher']
|
||||
description: >
|
||||
description: |
|
||||
A role that a participant can have in a room.
|
||||
The role determines the permissions of the participant in the room.
|
||||
- `moderator`: Can manage the room and its participants.
|
||||
|
||||
@ -12,9 +12,12 @@
|
||||
- participantTokenCookie: []
|
||||
parameters:
|
||||
- $ref: '../../components/parameters/room-id-path.yaml'
|
||||
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||
responses:
|
||||
'200':
|
||||
$ref: '../../components/responses/internal/success-end-meeting.yaml'
|
||||
'400':
|
||||
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||
'401':
|
||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||
'403':
|
||||
@ -36,9 +39,12 @@
|
||||
parameters:
|
||||
- $ref: '../../components/parameters/room-id-path.yaml'
|
||||
- $ref: '../../components/parameters/internal/participant-name.yaml'
|
||||
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||
responses:
|
||||
'200':
|
||||
$ref: '../../components/responses/internal/success-delete-participant.yaml'
|
||||
'400':
|
||||
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||
'401':
|
||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||
'403':
|
||||
|
||||
@ -8,11 +8,15 @@
|
||||
- Internal API - Recordings
|
||||
security:
|
||||
- participantTokenCookie: []
|
||||
parameters:
|
||||
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||
requestBody:
|
||||
$ref: '../../components/requestBodies/internal/start-recording-request.yaml'
|
||||
responses:
|
||||
'201':
|
||||
$ref: '../../components/responses/internal/success-start-recording.yaml'
|
||||
'400':
|
||||
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||
'401':
|
||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||
'403':
|
||||
@ -40,9 +44,12 @@
|
||||
- participantTokenCookie: []
|
||||
parameters:
|
||||
- $ref: '../../components/parameters/recording-id.yaml'
|
||||
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||
responses:
|
||||
'202':
|
||||
$ref: '../../components/responses/internal/success-stop-recording.yaml'
|
||||
'400':
|
||||
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||
'401':
|
||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||
'403':
|
||||
|
||||
@ -37,9 +37,12 @@
|
||||
- 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':
|
||||
|
||||
@ -101,9 +101,12 @@
|
||||
parameters:
|
||||
- $ref: '../components/parameters/room-id-path.yaml'
|
||||
- $ref: '../components/parameters/room-fields.yaml'
|
||||
- $ref: '../components/parameters/internal/x-participant-role.yaml'
|
||||
responses:
|
||||
'200':
|
||||
$ref: '../components/responses/success-get-room.yaml'
|
||||
'400':
|
||||
$ref: '../components/responses/internal/error-invalid-participant-role.yaml'
|
||||
'401':
|
||||
$ref: '../components/responses/unauthorized-error.yaml'
|
||||
'403':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user