@kubb/plugin-zod 4.29.1 → 4.31.1
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/dist/components.d.ts +4 -4
- package/dist/generators.d.ts +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/templates/ToZod.source.d.ts +1 -1
- package/package.json +9 -8
- package/dist/types-Cfvq128m.d.ts +0 -172
- 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,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)
|