-
Notifications
You must be signed in to change notification settings - Fork 61
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 support for "custom" definitions #27
Comments
I like the idea in principle, but I see a few issues:
How about something like this?
With output
This way we limit the blast radius by avoiding branding and can instantiate a References object "preloaded" with ref paths using the keys from the definitions option record |
Released as 3.19.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Having big and really deep nested schema would produce some crazy JSON output due to current ("seen" / "not seen") ref strategy.
Solution
What if we could help the strategy and mark a ZodObject with
.brand()
method to make it as separate definition?The text was updated successfully, but these errors were encountered: