forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webhook-schema.js
34 lines (33 loc) · 1 KB
/
webhook-schema.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env node
// This schema is used to validate each generated webhook object at build time
export default {
type: 'object',
required: ['availability', 'bodyParameters', 'category', 'descriptionHtml', 'summaryHtml'],
properties: {
// Properties from the source OpenAPI schema that this module depends on
action: {
description: 'The webhook action type',
type: ['string', 'null'],
},
availability: {
description: 'The supported origins of the webhook',
type: 'array',
},
bodyParameters: {
description: 'The request body parameters for the webhook',
type: 'array',
},
category: {
description: 'The name of the webhook and also the subcategory of the OpenAPI operation.',
type: 'string',
},
descriptionHtml: {
description: 'The description of the action property in the requestBody',
type: 'string',
},
summaryHtml: {
description: 'The description of the webhook',
type: 'string',
},
},
}