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

Add option to provide coercion #281

Open
asross opened this issue Apr 4, 2024 · 1 comment
Open

Add option to provide coercion #281

asross opened this issue Apr 4, 2024 · 1 comment

Comments

@asross
Copy link

asross commented Apr 4, 2024

I'm generating a zod object from an openapi schema, and I'd like it to be able to coerce values, e.g. converting strings to numbers. It would be easy if I was able to edit the zod object directly, but the schema gets updated periodically, and I want to be able to automatically pull in changes without having to reproduce my edits.

How easy would it be to implement this feature?

@amvFrontendMonkey
Copy link

@astahmer I'd be willing to provide a PR for opt-in coercion

Is this something you'd accept?

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