Created
October 3, 2021 20:04
-
-
Save mathis-m/0bc9f44b15d8729ac72e09d2a41dee61 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
openapi: 3.0.0 | |
info: | |
version: 1.0.0 | |
title: test | |
description: example with callback | |
paths: | |
/subscribe: | |
post: | |
summary: Subscribe to a webhook | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
callbackUrl: | |
type: string | |
format: uri | |
example: https://myserver.com/send/callback/here | |
required: | |
- callbackUrl | |
callbacks: | |
myEvent: | |
'{$request.body#/callbackUrl}': | |
post: | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
message: | |
type: string | |
example: Some event happened | |
required: | |
- message | |
responses: | |
'200': | |
description: Your server returns this code if it accepts the callback | |
responses: | |
'201': | |
description: Webhook created |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment