OAS3 Callbacks Section

In OAS3 there is the ability to specify a ‘callbacks’ section for an API endpoint. In Stoplight I have created a callbacks section for my endpoint in the ‘code’ tab (manually entered JSON code), but it isn’t showing up in the ‘read’ tab when I submit my changes. Other parts of the JSON that I manually entered is showing when I view the ‘read’ tab such as the request/response info, descriptions, etc. The callbacks info that I entered is completely missing though.

Does Stoplight support the ‘callbacks’ section in OAS3? Perhaps I didn’t enter the JSON correctly. Not sure.

Hi @steve.bloedel, at the moment Stoplight does not support the inclusion of callbacks in the rendered documentation. We have an open backlog item for adding that functionality, but it will probably be next year before it’s available.

What I would recommend doing instead is create a dedicated section of your Hub that details the callbacks available with JSON Schema blocks for representing the payloads. The Paddle team has a great example of what this might look like.

1 Like