@kubb/plugin-zod 4.29.1 → 4.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -8
- package/src/generators/__snapshots__/anyof.ts +0 -15
- package/src/generators/__snapshots__/coercion.ts +0 -15
- package/src/generators/__snapshots__/coercionDates.ts +0 -15
- package/src/generators/__snapshots__/coercionNumbers.ts +0 -15
- package/src/generators/__snapshots__/coercionStrings.ts +0 -15
- package/src/generators/__snapshots__/createItemUnionWithReadOnly.ts +0 -34
- package/src/generators/__snapshots__/createItemUnionWithReadOnly_wrapOutput.ts +0 -34
- package/src/generators/__snapshots__/createPet.ts +0 -22
- package/src/generators/__snapshots__/createPetWithUnknownTypeAny.ts +0 -13
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +0 -22
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput.ts +0 -29
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput_entire_.ts +0 -30
- package/src/generators/__snapshots__/createPet_wrapOutput.ts +0 -29
- package/src/generators/__snapshots__/deletePet.ts +0 -22
- package/src/generators/__snapshots__/deletePet_wrapOutput.ts +0 -22
- package/src/generators/__snapshots__/discriminator.ts +0 -36
- package/src/generators/__snapshots__/enumBooleanLiteral.ts +0 -7
- package/src/generators/__snapshots__/enumNamesType.ts +0 -7
- package/src/generators/__snapshots__/enumNullable.ts +0 -7
- package/src/generators/__snapshots__/enumSingleLiteral.ts +0 -7
- package/src/generators/__snapshots__/enumVarNamesType.ts +0 -7
- package/src/generators/__snapshots__/example.ts +0 -9
- package/src/generators/__snapshots__/exclusiveNumbers.ts +0 -14
- package/src/generators/__snapshots__/getPets.ts +0 -22
- package/src/generators/__snapshots__/getPetsWithQueryFilter_wrapOutput_all_.ts +0 -101
- package/src/generators/__snapshots__/getPets_wrapOutput.ts +0 -29
- package/src/generators/__snapshots__/imageNullable.ts +0 -7
- package/src/generators/__snapshots__/mixedValueTypeConst.ts +0 -14
- package/src/generators/__snapshots__/nullable.ts +0 -11
- package/src/generators/__snapshots__/nullableString.ts +0 -7
- package/src/generators/__snapshots__/nullableStringUuid.ts +0 -7
- package/src/generators/__snapshots__/nullableStringWithAnyOf.ts +0 -7
- package/src/generators/__snapshots__/numberValueConst.ts +0 -14
- package/src/generators/__snapshots__/oneof.ts +0 -14
- package/src/generators/__snapshots__/operations.ts +0 -106
- package/src/generators/__snapshots__/optionalPetInfer.ts +0 -13
- package/src/generators/__snapshots__/optionalPetTyped.ts +0 -12
- package/src/generators/__snapshots__/order.ts +0 -14
- package/src/generators/__snapshots__/orderDateTyeString.ts +0 -10
- package/src/generators/__snapshots__/orderDateTypeFalse.ts +0 -14
- package/src/generators/__snapshots__/orderDateTypeString.ts +0 -14
- package/src/generators/__snapshots__/pet.ts +0 -15
- package/src/generators/__snapshots__/petArray.ts +0 -14
- package/src/generators/__snapshots__/petCoercion.ts +0 -15
- package/src/generators/__snapshots__/petTupleObject.ts +0 -14
- package/src/generators/__snapshots__/petV4.ts +0 -15
- package/src/generators/__snapshots__/petV4Guid.ts +0 -15
- package/src/generators/__snapshots__/petWithMapper.ts +0 -15
- package/src/generators/__snapshots__/pets.ts +0 -14
- package/src/generators/__snapshots__/queryAllDefaulted.ts +0 -19
- package/src/generators/__snapshots__/queryAllDefaulted_wrapOutput.ts +0 -19
- package/src/generators/__snapshots__/recursive.ts +0 -10
- package/src/generators/__snapshots__/showPetById.ts +0 -22
- package/src/generators/__snapshots__/showPetById_wrapOutput.ts +0 -29
- package/src/generators/__snapshots__/stringValueConst.ts +0 -14
- package/src/generators/__snapshots__/toy.ts +0 -13
- package/src/generators/__snapshots__/unionWithReadOnly.ts +0 -28
- package/src/generators/__snapshots__/updateItemUnionWithReadOnly.ts +0 -34
- package/src/generators/__snapshots__/updateItemUnionWithReadOnly_wrapOutput.ts +0 -34
- package/src/generators/__snapshots__/uuidSchema.ts +0 -7
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description its value is equal to the value of the keyword
|
|
9
|
-
*/
|
|
10
|
-
export const numberValueConst = z
|
|
11
|
-
.object({
|
|
12
|
-
foobar: z.literal(42),
|
|
13
|
-
})
|
|
14
|
-
.describe('its value is equal to the value of the keyword')
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const test = z.union([
|
|
8
|
-
z.object({
|
|
9
|
-
propertyA: z.optional(z.string()),
|
|
10
|
-
}),
|
|
11
|
-
z.object({
|
|
12
|
-
propertyA: z.optional(z.string()),
|
|
13
|
-
}),
|
|
14
|
-
])
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import type * as z from 'zod'
|
|
6
|
-
import {
|
|
7
|
-
createPetsMutationRequest,
|
|
8
|
-
createPets201,
|
|
9
|
-
createPetsMutationResponse,
|
|
10
|
-
deletePet400,
|
|
11
|
-
deletePetMutationResponse,
|
|
12
|
-
deletePetPathParams,
|
|
13
|
-
deletePetHeaderParams,
|
|
14
|
-
listPets200,
|
|
15
|
-
listPetsQueryResponse,
|
|
16
|
-
listPetsQueryParams,
|
|
17
|
-
showPetById200,
|
|
18
|
-
showPetByIdQueryResponse,
|
|
19
|
-
showPetByIdPathParams,
|
|
20
|
-
} from './showPetById'
|
|
21
|
-
|
|
22
|
-
export type OperationSchema = {
|
|
23
|
-
readonly request: z.ZodTypeAny | undefined
|
|
24
|
-
readonly parameters: {
|
|
25
|
-
readonly path: z.ZodTypeAny | undefined
|
|
26
|
-
readonly query: z.ZodTypeAny | undefined
|
|
27
|
-
readonly header: z.ZodTypeAny | undefined
|
|
28
|
-
}
|
|
29
|
-
readonly responses: {
|
|
30
|
-
readonly [status: number]: z.ZodTypeAny
|
|
31
|
-
readonly default: z.ZodTypeAny
|
|
32
|
-
}
|
|
33
|
-
readonly errors: {
|
|
34
|
-
readonly [status: number]: z.ZodTypeAny
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type OperationsMap = Record<string, OperationSchema>
|
|
39
|
-
|
|
40
|
-
export const operations = {
|
|
41
|
-
listPets: {
|
|
42
|
-
request: undefined,
|
|
43
|
-
parameters: {
|
|
44
|
-
path: undefined,
|
|
45
|
-
query: listPetsQueryParams,
|
|
46
|
-
header: undefined,
|
|
47
|
-
},
|
|
48
|
-
responses: {
|
|
49
|
-
200: listPets200,
|
|
50
|
-
default: listPetsQueryResponse,
|
|
51
|
-
},
|
|
52
|
-
errors: {},
|
|
53
|
-
},
|
|
54
|
-
createPets: {
|
|
55
|
-
request: createPetsMutationRequest,
|
|
56
|
-
parameters: {
|
|
57
|
-
path: undefined,
|
|
58
|
-
query: undefined,
|
|
59
|
-
header: undefined,
|
|
60
|
-
},
|
|
61
|
-
responses: {
|
|
62
|
-
201: createPets201,
|
|
63
|
-
default: createPetsMutationResponse,
|
|
64
|
-
},
|
|
65
|
-
errors: {},
|
|
66
|
-
},
|
|
67
|
-
showPetById: {
|
|
68
|
-
request: undefined,
|
|
69
|
-
parameters: {
|
|
70
|
-
path: showPetByIdPathParams,
|
|
71
|
-
query: undefined,
|
|
72
|
-
header: undefined,
|
|
73
|
-
},
|
|
74
|
-
responses: {
|
|
75
|
-
200: showPetById200,
|
|
76
|
-
default: showPetByIdQueryResponse,
|
|
77
|
-
},
|
|
78
|
-
errors: {},
|
|
79
|
-
},
|
|
80
|
-
deletePet: {
|
|
81
|
-
request: undefined,
|
|
82
|
-
parameters: {
|
|
83
|
-
path: deletePetPathParams,
|
|
84
|
-
query: undefined,
|
|
85
|
-
header: deletePetHeaderParams,
|
|
86
|
-
},
|
|
87
|
-
responses: {
|
|
88
|
-
400: deletePet400,
|
|
89
|
-
default: deletePetMutationResponse,
|
|
90
|
-
},
|
|
91
|
-
errors: {
|
|
92
|
-
400: deletePet400,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
} as const
|
|
96
|
-
|
|
97
|
-
export const paths = {
|
|
98
|
-
'/pets': {
|
|
99
|
-
get: operations['listPets'],
|
|
100
|
-
post: operations['createPets'],
|
|
101
|
-
},
|
|
102
|
-
'/pets/{petId}': {
|
|
103
|
-
get: operations['showPetById'],
|
|
104
|
-
delete: operations['deletePet'],
|
|
105
|
-
},
|
|
106
|
-
} as const
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const optionalPet = z.object({
|
|
8
|
-
id: z.optional(z.number().int()),
|
|
9
|
-
name: z.optional(z.string()),
|
|
10
|
-
tag: z.optional(z.string()),
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export type OptionalPet = z.infer<typeof optionalPet>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
import { ToZod } from './test/.kubb/ToZod'
|
|
7
|
-
|
|
8
|
-
export const optionalPet = z.object({
|
|
9
|
-
id: z.optional(z.number().int()),
|
|
10
|
-
name: z.optional(z.string()),
|
|
11
|
-
tag: z.optional(z.string()),
|
|
12
|
-
}) as unknown as ToZod<OptionalPet>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const order = z.object({
|
|
8
|
-
id: z.optional(z.number().int()),
|
|
9
|
-
petId: z.optional(z.number().int()),
|
|
10
|
-
quantity: z.optional(z.number().int()),
|
|
11
|
-
shipDate: z.optional(z.date()),
|
|
12
|
-
status: z.optional(z.enum(['placed', 'approved', 'delivered']).describe('Order Status')),
|
|
13
|
-
complete: z.optional(z.boolean()),
|
|
14
|
-
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from 'zod'
|
|
2
|
-
|
|
3
|
-
export const order = z.object({
|
|
4
|
-
id: z.number().int().optional(),
|
|
5
|
-
petId: z.number().int().optional(),
|
|
6
|
-
quantity: z.number().int().optional(),
|
|
7
|
-
shipDate: z.string().datetime().optional(),
|
|
8
|
-
status: z.enum(['placed', 'approved', 'delivered']).describe('Order Status').optional(),
|
|
9
|
-
complete: z.boolean().optional(),
|
|
10
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const order = z.object({
|
|
8
|
-
id: z.optional(z.number().int()),
|
|
9
|
-
petId: z.optional(z.number().int()),
|
|
10
|
-
quantity: z.optional(z.number().int()),
|
|
11
|
-
shipDate: z.optional(z.string()),
|
|
12
|
-
status: z.optional(z.enum(['placed', 'approved', 'delivered']).describe('Order Status')),
|
|
13
|
-
complete: z.optional(z.boolean()),
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const order = z.object({
|
|
8
|
-
id: z.optional(z.number().int()),
|
|
9
|
-
petId: z.optional(z.number().int()),
|
|
10
|
-
quantity: z.optional(z.number().int()),
|
|
11
|
-
shipDate: z.optional(z.string().datetime()),
|
|
12
|
-
status: z.optional(z.enum(['placed', 'approved', 'delivered']).describe('Order Status')),
|
|
13
|
-
complete: z.optional(z.boolean()),
|
|
14
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const pet = z.object({
|
|
8
|
-
id: z.number().int(),
|
|
9
|
-
name: z.string(),
|
|
10
|
-
date: z.optional(z.date()),
|
|
11
|
-
uuid: z.optional(z.string().uuid()),
|
|
12
|
-
email: z.optional(z.string().email()),
|
|
13
|
-
pattern: z.optional(z.string().regex(/^[a-zA-Z0-9]{3}$/)),
|
|
14
|
-
tag: z.optional(z.string().min(5).max(100)),
|
|
15
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description List of Pet object
|
|
9
|
-
*/
|
|
10
|
-
export const petArray = z
|
|
11
|
-
.array(z.lazy(() => pet))
|
|
12
|
-
.min(1)
|
|
13
|
-
.max(3)
|
|
14
|
-
.describe('List of Pet object')
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const pet = z.object({
|
|
8
|
-
id: z.coerce.number().int(),
|
|
9
|
-
name: z.coerce.string(),
|
|
10
|
-
date: z.optional(z.coerce.date()),
|
|
11
|
-
uuid: z.optional(z.coerce.string().uuid()),
|
|
12
|
-
email: z.optional(z.coerce.string().email()),
|
|
13
|
-
pattern: z.optional(z.coerce.string().regex(/^[a-zA-Z0-9]{3}$/)),
|
|
14
|
-
tag: z.optional(z.coerce.string().min(5).max(100)),
|
|
15
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description Tuple of exact length 2 nested in an object
|
|
9
|
-
*/
|
|
10
|
-
export const petTupleObject = z
|
|
11
|
-
.object({
|
|
12
|
-
tupleProperty: z.optional(z.tuple([z.string(), z.string()])),
|
|
13
|
-
})
|
|
14
|
-
.describe('Tuple of exact length 2 nested in an object')
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const pet = z.object({
|
|
8
|
-
id: z.int(),
|
|
9
|
-
name: z.string(),
|
|
10
|
-
date: z.optional(z.date()),
|
|
11
|
-
uuid: z.optional(z.uuid()),
|
|
12
|
-
email: z.optional(z.email()),
|
|
13
|
-
pattern: z.optional(z.string().regex(/^[a-zA-Z0-9]{3}$/)),
|
|
14
|
-
tag: z.optional(z.string().min(5).max(100)),
|
|
15
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const pet = z.object({
|
|
8
|
-
id: z.int(),
|
|
9
|
-
name: z.string(),
|
|
10
|
-
date: z.optional(z.date()),
|
|
11
|
-
uuid: z.optional(z.guid()),
|
|
12
|
-
email: z.optional(z.email()),
|
|
13
|
-
pattern: z.optional(z.string().regex(/^[a-zA-Z0-9]{3}$/)),
|
|
14
|
-
tag: z.optional(z.string().min(5).max(100)),
|
|
15
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const pet = z.object({
|
|
8
|
-
id: z.number().int(),
|
|
9
|
-
name: z.string().email(),
|
|
10
|
-
date: z.optional(z.date()),
|
|
11
|
-
uuid: z.optional(z.string().uuid()),
|
|
12
|
-
email: z.optional(z.string().email()),
|
|
13
|
-
pattern: z.optional(z.string().regex(/^[a-zA-Z0-9]{3}$/)),
|
|
14
|
-
tag: z.optional(z.string().min(5).max(100)),
|
|
15
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
import { ToZod } from './test/.kubb/ToZod'
|
|
7
|
-
|
|
8
|
-
export const pets = z.array(
|
|
9
|
-
z.object({
|
|
10
|
-
id: z.number().int(),
|
|
11
|
-
name: z.string(),
|
|
12
|
-
tag: z.optional(z.string()),
|
|
13
|
-
}),
|
|
14
|
-
) as unknown as ToZod<Pets>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const getThingsQueryParams = z.object({
|
|
8
|
-
limit: z.coerce.number().int().min(1).max(100).default(100).describe('Maximum number of things to return'),
|
|
9
|
-
skip: z.coerce.number().int().min(0).default(0).describe('Number of things to skip'),
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description A list of things
|
|
14
|
-
*/
|
|
15
|
-
export const getThings200 = z.object({
|
|
16
|
-
items: z.array(z.lazy(() => thing)),
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export const getThingsQueryResponse = z.lazy(() => getThings200)
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import { z } from '@hono/zod-openapi'
|
|
6
|
-
|
|
7
|
-
export const getThingsQueryParams = z.object({
|
|
8
|
-
limit: z.coerce.number().int().min(1).max(100).default(100).describe('Maximum number of things to return'),
|
|
9
|
-
skip: z.coerce.number().int().min(0).default(0).describe('Number of things to skip'),
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description A list of things
|
|
14
|
-
*/
|
|
15
|
-
export const getThings200 = z.object({
|
|
16
|
-
items: z.array(z.lazy(() => thing)),
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export const getThingsQueryResponse = z.lazy(() => getThings200)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const showPetByIdPathParams = z.object({
|
|
8
|
-
petId: z.string().describe('The id of the pet to retrieve'),
|
|
9
|
-
testId: z.string().describe('The id of the pet to retrieve'),
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Expected response to a valid request
|
|
14
|
-
*/
|
|
15
|
-
export const showPetById200 = z.lazy(() => pet)
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @description unexpected error
|
|
19
|
-
*/
|
|
20
|
-
export const showPetByIdError = z.lazy(() => error)
|
|
21
|
-
|
|
22
|
-
export const showPetByIdQueryResponse = z.lazy(() => showPetById200)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import { z } from '@hono/zod-openapi'
|
|
6
|
-
|
|
7
|
-
export const showPetByIdPathParams = z.object({
|
|
8
|
-
petId: z.string().describe('The id of the pet to retrieve'),
|
|
9
|
-
testId: z.string().describe('The id of the pet to retrieve'),
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Expected response to a valid request
|
|
14
|
-
*/
|
|
15
|
-
export const showPetById200 = z.lazy(() => pet)
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @description unexpected error
|
|
19
|
-
*/
|
|
20
|
-
export const showPetByIdError = z
|
|
21
|
-
.lazy(() => error)
|
|
22
|
-
.openapi({
|
|
23
|
-
examples: [
|
|
24
|
-
{ sample: { summary: 'A sample error', value: { code: 1, message: 'A sample error message' } } },
|
|
25
|
-
{ other_example: { summary: 'Another sample error', value: { code: 2, message: 'A totally specific message' } } },
|
|
26
|
-
],
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
export const showPetByIdQueryResponse = z.lazy(() => showPetById200)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description its value is equal to the value of the keyword
|
|
9
|
-
*/
|
|
10
|
-
export const stringValueConst = z
|
|
11
|
-
.object({
|
|
12
|
-
foobar: z.literal('foobar'),
|
|
13
|
-
})
|
|
14
|
-
.describe('its value is equal to the value of the keyword')
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const toy = z
|
|
8
|
-
.object({
|
|
9
|
-
id: z.string().uuid(),
|
|
10
|
-
name: z.optional(z.string()),
|
|
11
|
-
description: z.string().nullish(),
|
|
12
|
-
})
|
|
13
|
-
.nullable()
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
export const item = z.union([
|
|
8
|
-
z
|
|
9
|
-
.lazy(() => itemTypeA)
|
|
10
|
-
.and(
|
|
11
|
-
z.object({
|
|
12
|
-
id: z.optional(z.number().int()),
|
|
13
|
-
type: z.literal('typeA'),
|
|
14
|
-
name: z.string(),
|
|
15
|
-
createdAt: z.optional(z.date()),
|
|
16
|
-
}),
|
|
17
|
-
),
|
|
18
|
-
z
|
|
19
|
-
.lazy(() => itemTypeB)
|
|
20
|
-
.and(
|
|
21
|
-
z.object({
|
|
22
|
-
id: z.optional(z.number().int()),
|
|
23
|
-
type: z.literal('typeB'),
|
|
24
|
-
name: z.string(),
|
|
25
|
-
createdAt: z.optional(z.date()),
|
|
26
|
-
}),
|
|
27
|
-
),
|
|
28
|
-
])
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import * as z from 'zod'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description Success
|
|
9
|
-
*/
|
|
10
|
-
export const updateItem200 = z.lazy(() => item)
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Item to update
|
|
14
|
-
*/
|
|
15
|
-
export const updateItemMutationRequest = z.union([
|
|
16
|
-
z
|
|
17
|
-
.lazy(() => itemTypeA)
|
|
18
|
-
.and(
|
|
19
|
-
z.object({
|
|
20
|
-
name: z.string(),
|
|
21
|
-
type: z.literal('typeA'),
|
|
22
|
-
}),
|
|
23
|
-
),
|
|
24
|
-
z
|
|
25
|
-
.lazy(() => itemTypeB)
|
|
26
|
-
.and(
|
|
27
|
-
z.object({
|
|
28
|
-
name: z.string(),
|
|
29
|
-
type: z.literal('typeB'),
|
|
30
|
-
}),
|
|
31
|
-
),
|
|
32
|
-
])
|
|
33
|
-
|
|
34
|
-
export const updateItemMutationResponse = z.lazy(() => updateItem200)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import { z } from '@hono/zod-openapi'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description Success
|
|
9
|
-
*/
|
|
10
|
-
export const updateItem200 = z.lazy(() => item)
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Item to update
|
|
14
|
-
*/
|
|
15
|
-
export const updateItemMutationRequest = z.union([
|
|
16
|
-
z
|
|
17
|
-
.lazy(() => itemTypeA)
|
|
18
|
-
.and(
|
|
19
|
-
z.object({
|
|
20
|
-
name: z.string(),
|
|
21
|
-
type: z.literal('typeA'),
|
|
22
|
-
}),
|
|
23
|
-
),
|
|
24
|
-
z
|
|
25
|
-
.lazy(() => itemTypeB)
|
|
26
|
-
.and(
|
|
27
|
-
z.object({
|
|
28
|
-
name: z.string(),
|
|
29
|
-
type: z.literal('typeB'),
|
|
30
|
-
}),
|
|
31
|
-
),
|
|
32
|
-
])
|
|
33
|
-
|
|
34
|
-
export const updateItemMutationResponse = z.lazy(() => updateItem200)
|