Zod
Officialv5.10.0@kubb/plugin-zod
kubb add plugin-zod
How-to guides
5 guides
Coerce input with ZodSet coercion to convert form data and query strings with z.coerce before Zod validates them, and see which format checks each key turns off.Compile Zod schemasSet compile to wrap generated schemas in z.compile(...) for faster validation, and see which schemas stay on the interpreter. Needs Zod 4.5 or later.Customize generated schemasPrefix inferred types, change Zod validators, and encode custom request types.Zod validators for OpenAPI formatsLook up the Zod v4 call Kubb writes for each OpenAPI type and format, such as z.uuid() for format: uuid, and the keywords that add a z.refine check.Infer TypeScript types from Zod schemasSet inferred to export a z.infer type next to each Zod schema, or z.input and z.output types for codecs, so you can skip @kubb/plugin-ts.
