forked from fabianrbz/kong-plugins-docs-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate schema and validate example for new standard webhooks plugin (…
…#50)
- Loading branch information
1 parent
0880c50
commit 061fd3c
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: standard-webhooks | ||
config: | ||
secret_v1: example-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"consumer": { | ||
"reference": "consumers", | ||
"type": "foreign", | ||
"description": "Custom type for representing a foreign key with a null value allowed.", | ||
"eq": null | ||
} | ||
}, | ||
{ | ||
"protocols": { | ||
"required": true, | ||
"elements": { | ||
"one_of": [ | ||
"grpc", | ||
"grpcs", | ||
"http", | ||
"https" | ||
], | ||
"type": "string" | ||
}, | ||
"type": "set", | ||
"default": [ | ||
"grpc", | ||
"grpcs", | ||
"http", | ||
"https" | ||
], | ||
"description": "A set of strings representing HTTP protocols." | ||
} | ||
}, | ||
{ | ||
"config": { | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"secret_v1": { | ||
"required": true, | ||
"referenceable": true, | ||
"description": "Webhook secret", | ||
"type": "string", | ||
"encrypted": true | ||
} | ||
}, | ||
{ | ||
"tolerance_second": { | ||
"required": true, | ||
"gt": -1, | ||
"type": "integer", | ||
"default": 300, | ||
"description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response." | ||
} | ||
} | ||
], | ||
"required": true | ||
} | ||
} | ||
], | ||
"entity_checks": [ | ||
|
||
] | ||
} |