-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support OpenAPI Callbacks #727
Comments
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
Hi @mcollina, I tried implementing it and found it a bit challenging. I didn't have enough time to learn and research the project. |
Have you tried using the |
@mcollina No, but it will work for me. app.route({
url: '/users',
method: 'POST',
schema: {...},
transform: (schema) => {
// Transform here
},
}); |
That would be awesome to implement. You should store that function somewhere in: app.route({
url: '/users',
method: 'POST',
schema: {...},
config: {
swaggerTransform: (schema) => {
// Transform here
}
}
}); |
@mcollina I just tried the |
I currently have no bandwidth to investigate. |
Prerequisites
🚀 Feature Proposal
OpenAPI 3 has a concept of callbacks, which means, async responses for an endpoint.
Currently, Fastify Swagger doesn't support this feature.
Motivation
It's part of the OpenAPI 3 specification. Many APIs use this feature.
Example
Defining the route and the schema:
Should generate this OpenAPI spec:
The text was updated successfully, but these errors were encountered: