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
|
name: x-signature
|
||||||
in: header
|
in: header
|
||||||
description: >
|
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
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
name: x-timestamp
|
name: x-timestamp
|
||||||
in: header
|
in: header
|
||||||
description: >
|
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
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
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:
|
role:
|
||||||
type: string
|
type: string
|
||||||
enum: ['moderator', 'publisher']
|
enum: ['moderator', 'publisher']
|
||||||
description: >
|
description: |
|
||||||
A role that a participant can have in a room.
|
A role that a participant can have in a room.
|
||||||
The role determines the permissions of the participant in the room.
|
The role determines the permissions of the participant in the room.
|
||||||
- `moderator`: Can manage the room and its participants.
|
- `moderator`: Can manage the room and its participants.
|
||||||
|
|||||||
@ -12,9 +12,12 @@
|
|||||||
- participantTokenCookie: []
|
- participantTokenCookie: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '../../components/parameters/room-id-path.yaml'
|
- $ref: '../../components/parameters/room-id-path.yaml'
|
||||||
|
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '../../components/responses/internal/success-end-meeting.yaml'
|
$ref: '../../components/responses/internal/success-end-meeting.yaml'
|
||||||
|
'400':
|
||||||
|
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||||
'401':
|
'401':
|
||||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||||
'403':
|
'403':
|
||||||
@ -36,9 +39,12 @@
|
|||||||
parameters:
|
parameters:
|
||||||
- $ref: '../../components/parameters/room-id-path.yaml'
|
- $ref: '../../components/parameters/room-id-path.yaml'
|
||||||
- $ref: '../../components/parameters/internal/participant-name.yaml'
|
- $ref: '../../components/parameters/internal/participant-name.yaml'
|
||||||
|
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '../../components/responses/internal/success-delete-participant.yaml'
|
$ref: '../../components/responses/internal/success-delete-participant.yaml'
|
||||||
|
'400':
|
||||||
|
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||||
'401':
|
'401':
|
||||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||||
'403':
|
'403':
|
||||||
|
|||||||
@ -8,11 +8,15 @@
|
|||||||
- Internal API - Recordings
|
- Internal API - Recordings
|
||||||
security:
|
security:
|
||||||
- participantTokenCookie: []
|
- participantTokenCookie: []
|
||||||
|
parameters:
|
||||||
|
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||||
requestBody:
|
requestBody:
|
||||||
$ref: '../../components/requestBodies/internal/start-recording-request.yaml'
|
$ref: '../../components/requestBodies/internal/start-recording-request.yaml'
|
||||||
responses:
|
responses:
|
||||||
'201':
|
'201':
|
||||||
$ref: '../../components/responses/internal/success-start-recording.yaml'
|
$ref: '../../components/responses/internal/success-start-recording.yaml'
|
||||||
|
'400':
|
||||||
|
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||||
'401':
|
'401':
|
||||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||||
'403':
|
'403':
|
||||||
@ -40,9 +44,12 @@
|
|||||||
- participantTokenCookie: []
|
- participantTokenCookie: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '../../components/parameters/recording-id.yaml'
|
- $ref: '../../components/parameters/recording-id.yaml'
|
||||||
|
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||||
responses:
|
responses:
|
||||||
'202':
|
'202':
|
||||||
$ref: '../../components/responses/internal/success-stop-recording.yaml'
|
$ref: '../../components/responses/internal/success-stop-recording.yaml'
|
||||||
|
'400':
|
||||||
|
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||||
'401':
|
'401':
|
||||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||||
'403':
|
'403':
|
||||||
|
|||||||
@ -37,9 +37,12 @@
|
|||||||
- participantTokenCookie: []
|
- participantTokenCookie: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '../../components/parameters/room-id-path.yaml'
|
- $ref: '../../components/parameters/room-id-path.yaml'
|
||||||
|
- $ref: '../../components/parameters/internal/x-participant-role.yaml'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '../../components/responses/internal/success-get-room-preferences.yaml'
|
$ref: '../../components/responses/internal/success-get-room-preferences.yaml'
|
||||||
|
'400':
|
||||||
|
$ref: '../../components/responses/internal/error-invalid-participant-role.yaml'
|
||||||
'401':
|
'401':
|
||||||
$ref: '../../components/responses/unauthorized-error.yaml'
|
$ref: '../../components/responses/unauthorized-error.yaml'
|
||||||
'403':
|
'403':
|
||||||
|
|||||||
@ -101,9 +101,12 @@
|
|||||||
parameters:
|
parameters:
|
||||||
- $ref: '../components/parameters/room-id-path.yaml'
|
- $ref: '../components/parameters/room-id-path.yaml'
|
||||||
- $ref: '../components/parameters/room-fields.yaml'
|
- $ref: '../components/parameters/room-fields.yaml'
|
||||||
|
- $ref: '../components/parameters/internal/x-participant-role.yaml'
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
$ref: '../components/responses/success-get-room.yaml'
|
$ref: '../components/responses/success-get-room.yaml'
|
||||||
|
'400':
|
||||||
|
$ref: '../components/responses/internal/error-invalid-participant-role.yaml'
|
||||||
'401':
|
'401':
|
||||||
$ref: '../components/responses/unauthorized-error.yaml'
|
$ref: '../components/responses/unauthorized-error.yaml'
|
||||||
'403':
|
'403':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user