Skip to content

Conversation

@MINJI121
Copy link

This PR updates the JSON Schema generation for z.record(z.enum(...), value) so that enum keys are included in required. This makes the generated JSON Schema match Zod v4's runtime and TypeScript behaviour for enum-key records.

Fixes #5474

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.

z.toJSONSchema with z.record(z.enum([...]), ...) resulting in optional keys

1 participant