v4: `z.toJSONSchema` incorrectly generates required properties for `default` values · Issue #4279 · colinhacks/zod · GitHub
More Web Proxy on the site http://driver.im/
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
When generating to JSON Schema (via z.toJSONSchema(...)), each optional field is expected to not be required in input schema, and required for the output schema.
Description
Given the below schemas:
When generating to JSON Schema (via
z.toJSONSchema(...)
), each optional field is expected to not berequired
in input schema, andrequired
for the output schema.Actual Result
The text was updated successfully, but these errors were encountered: