UNPKG

@kubb/plugin-zod

Version:

Zod schema generator plugin for Kubb, creating type-safe validation schemas from OpenAPI specifications for runtime data validation.

19 lines (17 loc) 440 B
/** * Generated by Kubb (https://kubb.dev/). * Do not edit manually. */ import { z } from 'zod' export const pet = z.object({ id: z.number().int(), name: z.coerce.string(), date: z.date().optional(), uuid: z.coerce.string().uuid().optional(), email: z.coerce.string().email().optional(), pattern: z.coerce .string() .regex(/^[a-zA-Z0-9]{3}$/) .optional(), tag: z.coerce.string().min(5).max(100).optional(), })