@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) • 752 B
text/typescript
/**
* Generated by Kubb (https://kubb.dev/).
* Do not edit manually.
*/
import { z } from '@hono/zod-openapi'
/**
* @description Null response
*/
export const createPets201 = z.unknown()
/**
* @description unexpected error
*/
export const createPetsError = 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 createPetsMutationRequest = z.object({
name: z.string().openapi({ example: 'Baxter' }),
tag: z.string(),
})
export const createPetsMutationResponse = z.lazy(() => createPets201)