-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoapi_callback.yaml
44 lines (43 loc) · 1.32 KB
/
oapi_callback.yaml
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
35
36
37
38
39
40
41
42
43
44
openapi: 3.0.0
info:
version: 0.0.0
title: test
paths:
/callback:
post:
summary: Subscribe to a webhook
operationId: callback
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
callbackUrl: # Callback URL
type: string
format: uri
example: https://myserver.com/send/callback/here
data:
type: object
required:
- callbackUrl
- eventType
- eventSource
responses:
'201':
description: Webhook created
callbacks: # Callback definition
myEvent: # Event name
'{$request.body#/callbackUrl}': # The callback URL,
# Refers to the passed URL
post:
requestBody: # Contents of the callback message
required: true
content:
application/json:
schema:
type: object
responses: # Expected responses to the callback message
'200':
description: Your server returns this code if it accepts the callback