zod-to-json-schema icon indicating copy to clipboard operation
zod-to-json-schema copied to clipboard

Converts Zod schemas to Json schemas

Results 24 zod-to-json-schema issues
Sort by recently updated
recently updated
newest added

I've just upgraded from `v3.18` to `v3.20` and noticed that the schema returned from `z.void()` is now `{}` instead of `undefined`. I've looked through the changelog and not seen this...

Breaking solution
V4

I see we have the file input case solved with latest Zod, but how can we have a ReadableStream output with a zod definition?

i get many circular dependencies from zod-to-json-schema when building with rollup see image: ![image](https://github.com/StefanTerdell/zod-to-json-schema/assets/81443707/af820d27-5cb8-4423-8c75-d7e778024213)

V4

Hi I would like to generate a JSON schema like the following: ```json { "type": "object", "title": "My Json Schema Title", "required": ["someProperty"], "properties": { "someProperty": { "type": "string" },...

Currently, `z.literal(null)` gets translated to `{"type": "object"}` which isn't very representative. Not sure if this is the right way to go about it, I just went with the most obvious...

Thanks for maintaining this library and staying up-to-date with Zod!

## Minimal reproducible example You can cut things short once `jsonSchema` is defined in all honesty—just inspect the `pattern`. I'm using CommonJS so you can try it out in the...

help wanted

Howdy! I understand that the branding system doesn't really exist at runtime, but there could be value in adding wrappers which enable the JSON ser/de to retain the brands. Something...

Back again! JSON obviously doesn't support records, so they're represented as objects with restrictions (where possible) on the property names and values. The package's handling is pretty good, but it...

bug

I believe I have found a small bug similar to https://github.com/StefanTerdell/zod-to-json-schema/issues/66. Using `[email protected]`. Here is a reproduction: ```ts const sharedFieldSchema = /* ... see below ... */; const schema =...

bug