Skip to content

Commit 458703d

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 6c05a2b commit 458703d

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
@@ -6897,6 +6897,25 @@ components:
68976897
mention:
68986898
type: string
68996899
description: User id that is set if a fragment refers to a user mention
6900+
WebhookPayload:
6901+
oneOf:
6902+
- $ref: "#/components/schemas/WebhookPingPayload"
6903+
- $ref: "#/components/schemas/WebhookFileUpdatePayload"
6904+
- $ref: "#/components/schemas/WebhookFileDeletePayload"
6905+
- $ref: "#/components/schemas/WebhookFileVersionUpdatePayload"
6906+
- $ref: "#/components/schemas/WebhookLibraryPublishPayload"
6907+
- $ref: "#/components/schemas/WebhookFileCommentPayload"
6908+
- $ref: "#/components/schemas/WebhookDevModeStatusUpdatePayload"
6909+
discriminator:
6910+
propertyName: event_type
6911+
mapping:
6912+
PING: "#/components/schemas/WebhookPingPayload"
6913+
FILE_UPDATE: "#/components/schemas/WebhookFileUpdatePayload"
6914+
FILE_DELETE: "#/components/schemas/WebhookFileDeletePayload"
6915+
FILE_VERSION_UPDATE: "#/components/schemas/WebhookFileVersionUpdatePayload"
6916+
LIBRARY_PUBLISH: "#/components/schemas/WebhookLibraryPublishPayload"
6917+
FILE_COMMENT: "#/components/schemas/WebhookFileCommentPayload"
6918+
DEV_MODE_STATUS_UPDATE: "#/components/schemas/WebhookDevModeStatusUpdatePayload"
69006919
WebhookBasePayload:
69016920
type: object
69026921
properties:

0 commit comments

Comments
 (0)