-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
coerce and transform not having proper types in output #759
Comments
Well-well-well... But I'll check it more precisely tomorrow. |
I don't think my provided example was directly related to the schema issue, I just found it while tinkering around. I can try to provide an example later this day. |
I checked the example in details — it's fine and it really reveals the confusion with the new coercion feature in Zod. I posted a more generic issue in Zod repo with a question to Colin. Maybe they would explain should it be fixed or it's somehow intentional. Anyway, thank you @teaishealthy |
The issue confirmed as a bug of |
I made a PR that should fix the issue in zod, but I'm still waiting for its approval. |
Bad news, @teaishealthy . |
That's really unfortunate 😕 although I should be able to get along without Anyway thank you for your efforts on this issue 👍 |
Regarding |
Typescript reports an error when using z.coerce or .transform in output.
Additionally generating an OpenAPI spec fails at runtime when using z.coere.bigint in input
Minimal reproducible example
Edit: Reading a bit through issues and discussions the behavior for output transforms seems intended?
Anyhow generating a OpenAPI spec still fails with z.coerce.bigint in input.
The text was updated successfully, but these errors were encountered: