Press Ctrl + ↵ anywhere to generate
OpenAPI spec (YAML or JSON)
yaml
Loading...
Generated output
Nothing generated yet
Paste an OpenAPI spec on the left and hit Generate — or just run the pre-loaded Pet Store example.
Ctrl + ↵ works too
Discriminated unions
oneOf/anyOf with a discriminator becomes a real z.discriminatedUnion() — not a lossy z.union().
String formats preserved
uuid, email, date-time, date, time, uri, ipv4/6 and regex patterns map to precise Zod refinements.
Recursive refs
Circular schemas resolve with z.lazy() — deep trees generate without stack overflows.