UNPKG

@kubb/plugin-zod

Version:

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

30 lines (25 loc) 817 B
/** * Generated by Kubb (https://kubb.dev/). * Do not edit manually. */ import { z } from '@hono/zod-openapi' export const listPetsQueryParams = z.object({ limit: z.string().describe('How many items to return at one time (max 100)').optional(), offset: z.coerce.number().int().default(0), }) /** * @description A paged array of pets */ export const listPets200 = z.lazy(() => pets) /** * @description unexpected error */ export const listPetsError = z .lazy(() => error) .openapi({ examples: [ { sample: { summary: 'A sample error', value: { code: 1, message: 'A sample error message' } } }, { other_example: { summary: 'Another sample error', value: { code: 2, message: 'A totally specific message' } } }, ], }) export const listPetsQueryResponse = z.lazy(() => listPets200)