-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ZodReadonly missing methods to manipulate schema shape #3577
Comments
ravinggenius
changed the title
ZodReadonly missing methods to manipulate shape
ZodReadonly missing methods to manipulate schema shape
Jun 15, 2024
I verified I'm using the latest version ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Several methods for manipulating the shape of a schema are conspicuously missing just by marking a schema as read-only:
Everything is fine if I remove
.readonly()
fromLATEST_VERSION
andVERSIONED_ITEM
. However these schemas represent views in the database, so they are inherently read-only. Shouldn't we be able to mark schemas as read-only and still be able to use helpers like.pick()
,.omit()
and.shape
?Edit: formatting
The text was updated successfully, but these errors were encountered: