StefanTerdell / json-schema-to-zod

ISC License
322 stars 46 forks source link

Support for more Annotated Keywords #84

Closed ethanleifer closed 6 months ago

ethanleifer commented 7 months ago

Hi!

Thank you for a great library.

I am looking to leverage the examples keyword. Would this be possible with Zod?

StefanTerdell commented 6 months ago

Unfortunately not. There was a proposal to add this to Zod but it never went anywhere. Here's a link to the issue.

alexrecuenco commented 5 months ago

Forgive the intrusion, but given how there is zod-openapi that includes a .openapi field, ¿is there any way for a user t hook into json-schema-to-zod to do custom logic?

I was looking at the internals, and I can't see documentation in how I would go about adding a [".openapi(", ")"] custom format, I don't see any plugin process I can hook into, I might be mistaken.

Another example would be how now format:binary is converted to base64() and I'd like that to be ignored as well...