StefanTerdell / zod-to-json-schema

Converts Zod schemas to Json schemas
ISC License
854 stars 67 forks source link

🚀 3.23.0 #115

Closed colinhacks closed 4 months ago

colinhacks commented 4 months ago

Just to get you started :)

Currently a beta version of zod is hard-coded into the package.json so you'll want to update that before merging.

colinhacks commented 4 months ago

This is unrelated but you could use pattern to enforce toLowerCase/toUpperCase/trim. e.g. you can use /^[^A-Z]*$/ for .toLowerCase(). You're right that those are "mutating" checks..but ultimately they do refine the output type meaningfully.

StefanTerdell commented 4 months ago

Thanks for contributing! I think the confusion about the mutating checks was mostly about the nomenclature, and the good old input/output target question. V4 will give us a chance to clear all that up for good :)