|
3 | 3 | * Do not edit manually.
|
4 | 4 | */
|
5 | 5 |
|
6 |
| -import type { |
7 |
| - CreatePetsPathParamsType, |
8 |
| - CreatePetsQueryParamsType, |
9 |
| - CreatePetsHeaderParamsType, |
10 |
| - CreatePets201Type, |
11 |
| - CreatePetsErrorType, |
12 |
| - CreatePetsMutationRequestType, |
13 |
| - CreatePetsMutationResponseType, |
14 |
| -} from '../ts/CreatePetsType.ts' |
15 |
| -import type { ToZod } from '@kubb/plugin-zod/utils' |
16 | 6 | import { z } from '../../zod.ts'
|
17 | 7 | import { petNotFoundSchema } from './petNotFoundSchema.gen.ts'
|
18 | 8 |
|
19 | 9 | export const createPetsPathParamsSchema = z.object({
|
20 | 10 | uuid: z.string().describe('UUID'),
|
21 |
| -}) as unknown as ToZod<CreatePetsPathParamsType> |
| 11 | +}) |
22 | 12 |
|
23 |
| -export type CreatePetsPathParamsSchema = CreatePetsPathParamsType |
| 13 | +export type CreatePetsPathParamsSchema = z.infer<typeof createPetsPathParamsSchema> |
24 | 14 |
|
25 | 15 | export const createPetsQueryParamsSchema = z
|
26 | 16 | .object({
|
27 | 17 | offset: z.optional(z.coerce.number().int().describe('Offset')),
|
28 | 18 | })
|
29 |
| - .optional() as unknown as ToZod<CreatePetsQueryParamsType> |
| 19 | + .optional() |
30 | 20 |
|
31 |
| -export type CreatePetsQueryParamsSchema = CreatePetsQueryParamsType |
| 21 | +export type CreatePetsQueryParamsSchema = z.infer<typeof createPetsQueryParamsSchema> |
32 | 22 |
|
33 | 23 | export const createPetsHeaderParamsSchema = z.object({
|
34 | 24 | 'X-EXAMPLE': z.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'),
|
35 |
| -}) as unknown as ToZod<CreatePetsHeaderParamsType> |
| 25 | +}) |
36 | 26 |
|
37 |
| -export type CreatePetsHeaderParamsSchema = CreatePetsHeaderParamsType |
| 27 | +export type CreatePetsHeaderParamsSchema = z.infer<typeof createPetsHeaderParamsSchema> |
38 | 28 |
|
39 | 29 | /**
|
40 | 30 | * @description Null response
|
41 | 31 | */
|
42 |
| -export const createPets201Schema = z.any() as unknown as ToZod<CreatePets201Type> |
| 32 | +export const createPets201Schema = z.any() |
43 | 33 |
|
44 |
| -export type CreatePets201Schema = CreatePets201Type |
| 34 | +export type CreatePets201Schema = z.infer<typeof createPets201Schema> |
45 | 35 |
|
46 | 36 | /**
|
47 | 37 | * @description unexpected error
|
48 | 38 | */
|
49 |
| -export const createPetsErrorSchema = z.lazy(() => petNotFoundSchema).describe('Pet not found') as unknown as ToZod<CreatePetsErrorType> |
| 39 | +export const createPetsErrorSchema = z.lazy(() => petNotFoundSchema).describe('Pet not found') |
50 | 40 |
|
51 |
| -export type CreatePetsErrorSchema = CreatePetsErrorType |
| 41 | +export type CreatePetsErrorSchema = z.infer<typeof createPetsErrorSchema> |
52 | 42 |
|
53 | 43 | export const createPetsMutationRequestSchema = z.object({
|
54 | 44 | name: z.string(),
|
55 | 45 | tag: z.string(),
|
56 |
| -}) as unknown as ToZod<CreatePetsMutationRequestType> |
| 46 | +}) |
57 | 47 |
|
58 |
| -export type CreatePetsMutationRequestSchema = CreatePetsMutationRequestType |
| 48 | +export type CreatePetsMutationRequestSchema = z.infer<typeof createPetsMutationRequestSchema> |
59 | 49 |
|
60 |
| -export const createPetsMutationResponseSchema = z.lazy(() => createPets201Schema) as unknown as ToZod<CreatePetsMutationResponseType> |
| 50 | +export const createPetsMutationResponseSchema = z.lazy(() => createPets201Schema) |
61 | 51 |
|
62 |
| -export type CreatePetsMutationResponseSchema = CreatePetsMutationResponseType |
| 52 | +export type CreatePetsMutationResponseSchema = z.infer<typeof createPetsMutationResponseSchema> |
0 commit comments