-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Switching to using zod-openapi from zod-to-jsonschema to solve things like definition? #415
Comments
I've just pushed out a version on my fork with working zod-openapi integration if you're interested: |
amazing! any usage differences? |
in particular how does it support openapi defs? |
There aren't any major usage differences other than the few current compatibility issues mentioned above which you might need to work around depending on your schema. Headers are also now provided using a Zod schema so if you were using those you might need to change that. Other than those nothing should need to change about your definition. The request/response schemas used in the procedure definition are just passed to zod-openapi with minimal modification (just extracting out any fields needed for path/query params) which then creates the spec document, so all info set in the |
Related issue here samchungy/zod-openapi#181
zod-openapi seems to have much better metadata and openapi support. In particular it could be extremely helpful for things like re-using definitions across the API endpoints. Could we look into adopting it?
The text was updated successfully, but these errors were encountered: