Skip to content

Commit cc47730

Browse files
committed
add WebhookPayload definition
Add `WebhookPayload` which contains a `discriminator` to map the different payload types based on the value of `event_type`.
1 parent 887d806 commit cc47730

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

openapi/openapi.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6913,6 +6913,25 @@ components:
69136913
mention:
69146914
type: string
69156915
description: User id that is set if a fragment refers to a user mention
6916+
WebhookPayload:
6917+
oneOf:
6918+
- $ref: "#/components/schemas/WebhookPingPayload"
6919+
- $ref: "#/components/schemas/WebhookFileUpdatePayload"
6920+
- $ref: "#/components/schemas/WebhookFileDeletePayload"
6921+
- $ref: "#/components/schemas/WebhookFileVersionUpdatePayload"
6922+
- $ref: "#/components/schemas/WebhookLibraryPublishPayload"
6923+
- $ref: "#/components/schemas/WebhookFileCommentPayload"
6924+
- $ref: "#/components/schemas/WebhookDevModeStatusUpdatePayload"
6925+
discriminator:
6926+
propertyName: event_type
6927+
mapping:
6928+
PING: "#/components/schemas/WebhookPingPayload"
6929+
FILE_UPDATE: "#/components/schemas/WebhookFileUpdatePayload"
6930+
FILE_DELETE: "#/components/schemas/WebhookFileDeletePayload"
6931+
FILE_VERSION_UPDATE: "#/components/schemas/WebhookFileVersionUpdatePayload"
6932+
LIBRARY_PUBLISH: "#/components/schemas/WebhookLibraryPublishPayload"
6933+
FILE_COMMENT: "#/components/schemas/WebhookFileCommentPayload"
6934+
DEV_MODE_STATUS_UPDATE: "#/components/schemas/WebhookDevModeStatusUpdatePayload"
69166935
WebhookBasePayload:
69176936
type: object
69186937
properties:

0 commit comments

Comments
 (0)