Stefan Terdell
Stefan Terdell
Having the behaviour of the schema change based on the parsing seems like a mistake to me. There would be no way to account for it in conversion / translation...
I'm working on another option that would be useful for this case (callback). Maybe you could find a way to expose the zodToJsonSchema options object through the trpc-openapi API? BigInt...
I'm a bit late on the ball here haha. GHs UI sure is one of the UIs of all time Dont know much about open api but I believe it...
Actually here's a very rough proof of concept @jlalmes ```typescript import { zodToJsonSchema } from "zodToJsonSchema"; import { ZodSchema, z } from "zod"; function buildDefinition( paths: Record< string, Record< "get"...
Hi, thanks for opening an issue. The first problem is valid. jsonSchemaToZod should accept the output types of zodToJsonSchema. I will look into this... at some point. ;) The second...
From what I can tell there's no native way to do that in Zod. You can open an issue or a PR in the Zod repo to add something like...
There's no way to serialize an instanceof check unfortunately, and you're not describing the serialized data with that schema anyway. The base64 route is probably your best bet still
Added a PR over at Zod for a base64 check. I guess we'll see how that goes :) https://github.com/colinhacks/zod/pull/3047
Hello! A solution to this is now available as of 3.23.0. Since the schema is interpreted to represent the serialized data you can use `z.string().base64()` to represent file contents. By...
@thelinuxlich