Skip to content

Commit ace7448

Browse files
committed
feat: add string enums to webhook field types
1 parent 4fec5b3 commit ace7448

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

xero-webhooks.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: 3.1.1
22
info:
3-
description: The Xero Webhooks API exposes event notifications relating to entities in the Xero Public API and can be used for a variety of purposes.
3+
description: The Xero Webhooks API exposes event notifications relating to entities in the Xero Public API and can be used for a variety of purposes
44
title: Xero Webhooks API
55
version: 9.2.0
66
termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
@@ -9,8 +9,9 @@ info:
99
1010
url: https://developer.xero.com
1111
servers:
12-
- description: The Xero Webhooks API exposes event notifications relating to entities in the Xero Public API and can be used for a variety of purposes.
12+
- description: The Xero Webhooks API exposes event notifications relating to entities in the Xero Public API and can be used for a variety of purposes
1313
url: https://api.xero.com
14+
security: []
1415
webhooks:
1516
invoices:
1617
post:
@@ -97,17 +98,27 @@ components:
9798
description: The date and time that event occurred (UTC time)
9899
eventType:
99100
type: string
100-
description: The type of event of that occurred (e.g. Update)
101+
description: The type of event of that occurred (e.g. UPDATE)
102+
enum:
103+
- CREATE
104+
- UPDATE
101105
eventCategory:
102106
type: string
103-
description: The category of event that occurred (e.g. CONTACT). You will only retrieve events from categories that your webhook is subscribed to.
107+
description: The category of event that occurred (e.g. CONTACT). You will only retrieve events from categories that your webhook is subscribed to
108+
enum:
109+
- CONTACT
110+
- INVOICE
111+
- SUBSCRIPTION
104112
tenantId:
105113
type: string
106114
format: uuid
107115
description: The ID of the tenant that the event happened in relation to (OrganisationID or ApplicationID)
108116
tenantType:
109117
type: string
110118
description: The type of tenant, depending on the type of event it will be one of ORGANISATION (for Contact or Invoice events), or APPLICATION (for Subscription events)
119+
enum:
120+
- ORGANISATION
121+
- APPLICATION
111122
required:
112123
- resourceUrl
113124
- resourceId
@@ -116,20 +127,20 @@ components:
116127
- eventCategory
117128
- tenantId
118129
- tenantType
119-
description: A list of events that have occurred.
130+
description: A list of events that have occurred
120131
lastEventSequence:
121132
type: integer
122133
minimum: 1
123134
maximum: 2147483647
124-
description: The sequence number of the last event in the list.
135+
description: The sequence number of the last event in the list
125136
firstEventSequence:
126137
type: integer
127138
minimum: 1
128139
maximum: 2147483647
129-
description: The sequence number of the first event in the list.
140+
description: The sequence number of the first event in the list
130141
entropy:
131142
type: string
132-
description: A random string used for security or validation purposes.
143+
description: A random string used for security or validation purposes
133144
responses:
134145
401InvalidWebhookData:
135146
description: Return a 401 status to indicate that the webhook subscription failed

0 commit comments

Comments
 (0)