You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
Currently, I'm migrating my Python project's schemas over to Zod and I can't find any mention of a key aliasing feature in Zod.
This functionality exists in other libraries such as Pydantic and Serde. See the embedded links for documentation.
Here's the sample Pydantic code:
Basically, this code means that I can provide a JSON such as:
or
and they will both map to
penalty_range
internally when referencing the object.Is this even possible to do in Zod? If not, how would I approach this issue without being too repetitive?
Beta Was this translation helpful? Give feedback.
All reactions