openapi: update webhook and recording schemas for improved clarity and structure
This commit is contained in:
parent
32055b98c4
commit
e0a305bff3
@ -3,37 +3,33 @@ MeetWebhookEvent:
|
||||
properties:
|
||||
creationDate:
|
||||
type: number
|
||||
description: The timestamp when the webhook event was created.
|
||||
description: The date when the event was created (milliseconds since the Unix epoch).
|
||||
example: 1620000000000
|
||||
event:
|
||||
$ref: '#/MeetWebhookEventType'
|
||||
description: The type of event.
|
||||
type: string
|
||||
description: Event type identifier.
|
||||
enum:
|
||||
- recordingStarted
|
||||
- recordingUpdated
|
||||
- recordingEnded
|
||||
- meetingStarted
|
||||
- meetingEnded
|
||||
example: recordingStarted
|
||||
data:
|
||||
oneOf:
|
||||
- allOf:
|
||||
- title: Recording Event Data
|
||||
- description: Data for recording-related events (started, updated, ended)
|
||||
- $ref: './meet-recording.yaml'
|
||||
# - allOf:
|
||||
# - title: Room Event Data
|
||||
# - description: Data for room-related events (created, updated, deleted)
|
||||
# - $ref: './meet-room.yaml'
|
||||
- allOf:
|
||||
- title: Room Event Data
|
||||
- description: Data for room-related events (meeting started, meeting ended)
|
||||
- $ref: './meet-room.yaml'
|
||||
discriminator:
|
||||
propertyName: eventType
|
||||
mapping:
|
||||
recordingStarted: './meet-recording.yaml'
|
||||
recordingUpdated: './meet-recording.yaml'
|
||||
recordingEnded: './meet-recording.yaml'
|
||||
# roomCreated: './meet-room.yaml'
|
||||
# roomUpdated: './meet-room.yaml'
|
||||
# roomDeleted: './meet-room.yaml'
|
||||
description: The event payload data, determined by the event type.
|
||||
|
||||
MeetWebhookEventType:
|
||||
type: string
|
||||
enum:
|
||||
- recordingStarted
|
||||
- recordingUpdated
|
||||
- recordingEnded
|
||||
# - roomCreated
|
||||
# - roomUpdated
|
||||
# - roomDeleted
|
||||
meetingStarted: './meet-room.yaml'
|
||||
meetingEnded: './meet-room.yaml'
|
||||
|
||||
@ -2,6 +2,8 @@ type: object
|
||||
required:
|
||||
- recordingId
|
||||
- roomId
|
||||
- roomName
|
||||
- status
|
||||
- filename
|
||||
- startDate
|
||||
properties:
|
||||
@ -13,6 +15,13 @@ properties:
|
||||
type: string
|
||||
description: The ID of the room where the recording was made.
|
||||
example: room-123
|
||||
roomName:
|
||||
type: string
|
||||
description: The name of the room where the recording was made.
|
||||
example: 'room'
|
||||
status:
|
||||
type: string
|
||||
description: The status of the recording.
|
||||
filename:
|
||||
type: string
|
||||
description: The name of the recording file.
|
||||
|
||||
@ -11,7 +11,6 @@ properties:
|
||||
event:
|
||||
type: string
|
||||
description: Event type identifier.
|
||||
example: webhookEvent
|
||||
data:
|
||||
type: object
|
||||
description: The data associated with the event.
|
||||
|
||||
@ -22,17 +22,11 @@ recordingStarted:
|
||||
example: recordingStarted
|
||||
data:
|
||||
type: object
|
||||
required:
|
||||
- recordingId
|
||||
- roomId
|
||||
- status
|
||||
allOf:
|
||||
- $ref: ../components/schemas/recording-base.yaml
|
||||
- properties:
|
||||
status:
|
||||
type: string
|
||||
enum: [STARTING, ACTIVE]
|
||||
description: The status of the recording.
|
||||
example: STARTING
|
||||
responses:
|
||||
'200':
|
||||
@ -62,17 +56,11 @@ recordingUpdated:
|
||||
example: recordingUpdated
|
||||
data:
|
||||
type: object
|
||||
required:
|
||||
- recordingId
|
||||
- roomId
|
||||
- status
|
||||
allOf:
|
||||
- $ref: ../components/schemas/recording-base.yaml
|
||||
- properties:
|
||||
status:
|
||||
type: string
|
||||
enum: [ACTIVE, ENDING]
|
||||
description: The status of the recording.
|
||||
example: ACTIVE
|
||||
responses:
|
||||
'200':
|
||||
@ -104,17 +92,15 @@ recordingEnded:
|
||||
data:
|
||||
type: object
|
||||
required:
|
||||
- recordingId
|
||||
- roomId
|
||||
- status
|
||||
- endDate
|
||||
- duration
|
||||
- size
|
||||
- details
|
||||
allOf:
|
||||
- $ref: ../components/schemas/recording-base.yaml
|
||||
- properties:
|
||||
status:
|
||||
type: string
|
||||
enum: [COMPLETE, FAILED, ABORTED, LIMIT_REACHED]
|
||||
description: The status of the recording.
|
||||
example: COMPLETE
|
||||
endDate:
|
||||
type: number
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user