Skip to content
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 for callbacks? #275

Open
noqcks opened this issue Nov 26, 2024 · 1 comment
Open

Support for callbacks? #275

noqcks opened this issue Nov 26, 2024 · 1 comment

Comments

@noqcks
Copy link

noqcks commented Nov 26, 2024

OpenAPI v3 has support for callbacks - a way of defining your webhooks and payloads using OpenAPI

I was wondering if zod-to-openapi supports this right now? I couldnt find any documentation or issues.

If not, would be great to have!

https://swagger.io/docs/specification/v3_0/callbacks/

@AGalabov
Copy link
Collaborator

AGalabov commented Dec 2, 2024

@noqcks this is not currently supported in terms of "generation" and I am not sure how would that look like in a real life scenario. You can however pass any arbitrary values to the openapi method and that way you can augment the generated documentation for your endpoint manually (with a direct JSON structure). So in that sense - we do support it.

If you have an idea of how automatic generation can be included - please share it here as an example and I would be open to including it in the library at some point. And if there is no such example - I'd go ahead and close the issue with the idea that callback can be manually added and that is enough.

To be honest there isn't much time on our side to actively develop features here, so if you want this rather fast - feel free to open up a PR and we can check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants