8000 Allow async schema transforms by rmvn27 · Pull Request #146 · ecyrbe/zodios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow async schema transforms #146

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

Merged
merged 2 commits into from
Sep 22, 2022
Merged

Allow async schema transforms #146

merged 2 commits into from
Sep 22, 2022

Conversation

rmvn27
Copy link
Contributor
@rmvn27 rmvn27 commented Sep 22, 2022

With this PR it would be possible to use async functions for transform and refine on the zod schema.
parseAsync has to be used otherwise zod will throw an exception if an async function is passed for the transformation.

@ecyrbe
Copy link
Owner
ecyrbe commented Sep 22, 2022

Thank you, very much.
Can you also add a test that covers this use case?

@rmvn27
Copy link
Contributor Author
rmvn27 commented Sep 22, 2022

I've created tests for the zodValidationPlugin

@ecyrbe
Copy link
Owner
ecyrbe commented Sep 22, 2022

This is really nice. Thank you again.

@ecyrbe ecyrbe merged commit a0b3598 into ecyrbe:main Sep 22, 2022
@rmvn27 rmvn27 deleted the schema_parseAsync branch September 22, 2022 18:58
@ecyrbe
Copy link
Owner
ecyrbe commented Sep 22, 2022

Available in version 9.1.1

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

Successfully merging this pull request may close these issues.

2 participants
0