Closed kibertoad closed 2 years ago
See https://github.com/fastify/help/issues/728#issuecomment-1205741881 I'm happy to work on support for this, but would need some pointers. @turkerdev
Hey @kibertoad, @turkerdev, thank you for creating and maintaining this project!
You could potentially use the same approach as fastify-zod
& leverage zod-to-json-schema
to generate an openApi3
schema ?
@Gomah Sounds like a plan! any suggestions where to plug that in?
@kibertoad I did manage to create a working demo (CodeSandbox), do not forget to run "dev" script.
@turkerdev Thank you, will check it out! Do you think this should be included as a part of fastify-type-provider-zod, e. g. as zodFastifySwaggerTransformer? Or you see this as an absolutely separate thing?
I think we can include it in this package.
@turkerdev Awesome, I'll create a PR, and include test as well then. Can you take a look at https://github.com/turkerdev/fastify-type-provider-zod/pull/5 prior to that?
Using fastify-type-provider-zod together with https://github.com/fastify/fastify-swagger results in route documentation being generated without request schemas.
Configuration used: