You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to be able to describe callbacks/webhooks in our API. For example,
paths:
/subscribe:
post:
summary: Subscribe to a webhook
requestBody:
…
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
properties:
message:
type: string
example: Some event happened
required:
- message
responses: # Expected responses to the callback message
'200':
description: Your server returns this code if it accepts the callback
For the above example, Oazapfts generates the /subscribe endpoint, but nothing is generated for the callback part of the spec. Ideally we would get a type for the body of the callback request, something like:
type myEventBody = {
message: string
}
I'm not sure if there's anything beyond that which would be useful to generate?
The text was updated successfully, but these errors were encountered:
We'd like to be able to describe callbacks/webhooks in our API. For example,
(https://swagger.io/docs/specification/callbacks)
For the above example, Oazapfts generates the
/subscribe
endpoint, but nothing is generated for the callback part of the spec. Ideally we would get a type for the body of the callback request, something like:I'm not sure if there's anything beyond that which would be useful to generate?
The text was updated successfully, but these errors were encountered: