@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.
Files changed (61) hide show
  1. package/package.json +9 -8
  2. package/src/generators/__snapshots__/anyof.ts +0 -15
  3. package/src/generators/__snapshots__/coercion.ts +0 -15
  4. package/src/generators/__snapshots__/coercionDates.ts +0 -15
  5. package/src/generators/__snapshots__/coercionNumbers.ts +0 -15
  6. package/src/generators/__snapshots__/coercionStrings.ts +0 -15
  7. package/src/generators/__snapshots__/createItemUnionWithReadOnly.ts +0 -34
  8. package/src/generators/__snapshots__/createItemUnionWithReadOnly_wrapOutput.ts +0 -34
  9. package/src/generators/__snapshots__/createPet.ts +0 -22
  10. package/src/generators/__snapshots__/createPetWithUnknownTypeAny.ts +0 -13
  11. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +0 -22
  12. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput.ts +0 -29
  13. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput_entire_.ts +0 -30
  14. package/src/generators/__snapshots__/createPet_wrapOutput.ts +0 -29
  15. package/src/generators/__snapshots__/deletePet.ts +0 -22
  16. package/src/generators/__snapshots__/deletePet_wrapOutput.ts +0 -22
  17. package/src/generators/__snapshots__/discriminator.ts +0 -36
  18. package/src/generators/__snapshots__/enumBooleanLiteral.ts +0 -7
  19. package/src/generators/__snapshots__/enumNamesType.ts +0 -7
  20. package/src/generators/__snapshots__/enumNullable.ts +0 -7
  21. package/src/generators/__snapshots__/enumSingleLiteral.ts +0 -7
  22. package/src/generators/__snapshots__/enumVarNamesType.ts +0 -7
  23. package/src/generators/__snapshots__/example.ts +0 -9
  24. package/src/generators/__snapshots__/exclusiveNumbers.ts +0 -14
  25. package/src/generators/__snapshots__/getPets.ts +0 -22
  26. package/src/generators/__snapshots__/getPetsWithQueryFilter_wrapOutput_all_.ts +0 -101
  27. package/src/generators/__snapshots__/getPets_wrapOutput.ts +0 -29
  28. package/src/generators/__snapshots__/imageNullable.ts +0 -7
  29. package/src/generators/__snapshots__/mixedValueTypeConst.ts +0 -14
  30. package/src/generators/__snapshots__/nullable.ts +0 -11
  31. package/src/generators/__snapshots__/nullableString.ts +0 -7
  32. package/src/generators/__snapshots__/nullableStringUuid.ts +0 -7
  33. package/src/generators/__snapshots__/nullableStringWithAnyOf.ts +0 -7
  34. package/src/generators/__snapshots__/numberValueConst.ts +0 -14
  35. package/src/generators/__snapshots__/oneof.ts +0 -14
  36. package/src/generators/__snapshots__/operations.ts +0 -106
  37. package/src/generators/__snapshots__/optionalPetInfer.ts +0 -13
  38. package/src/generators/__snapshots__/optionalPetTyped.ts +0 -12
  39. package/src/generators/__snapshots__/order.ts +0 -14
  40. package/src/generators/__snapshots__/orderDateTyeString.ts +0 -10
  41. package/src/generators/__snapshots__/orderDateTypeFalse.ts +0 -14
  42. package/src/generators/__snapshots__/orderDateTypeString.ts +0 -14
  43. package/src/generators/__snapshots__/pet.ts +0 -15
  44. package/src/generators/__snapshots__/petArray.ts +0 -14
  45. package/src/generators/__snapshots__/petCoercion.ts +0 -15
  46. package/src/generators/__snapshots__/petTupleObject.ts +0 -14
  47. package/src/generators/__snapshots__/petV4.ts +0 -15
  48. package/src/generators/__snapshots__/petV4Guid.ts +0 -15
  49. package/src/generators/__snapshots__/petWithMapper.ts +0 -15
  50. package/src/generators/__snapshots__/pets.ts +0 -14
  51. package/src/generators/__snapshots__/queryAllDefaulted.ts +0 -19
  52. package/src/generators/__snapshots__/queryAllDefaulted_wrapOutput.ts +0 -19
  53. package/src/generators/__snapshots__/recursive.ts +0 -10
  54. package/src/generators/__snapshots__/showPetById.ts +0 -22
  55. package/src/generators/__snapshots__/showPetById_wrapOutput.ts +0 -29
  56. package/src/generators/__snapshots__/stringValueConst.ts +0 -14
  57. package/src/generators/__snapshots__/toy.ts +0 -13
  58. package/src/generators/__snapshots__/unionWithReadOnly.ts +0 -28
  59. package/src/generators/__snapshots__/updateItemUnionWithReadOnly.ts +0 -34
  60. package/src/generators/__snapshots__/updateItemUnionWithReadOnly_wrapOutput.ts +0 -34
  61. package/src/generators/__snapshots__/uuidSchema.ts +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-zod",
3
- "version": "4.29.1",
3
+ "version": "4.31.0",
4
4
  "description": "Zod schema generator plugin for Kubb, creating type-safe validation schemas from OpenAPI specifications for runtime data validation.",
5
5
  "keywords": [
6
6
  "zod",
@@ -66,7 +66,8 @@
66
66
  "templates",
67
67
  "dist",
68
68
  "!/**/**.test.**",
69
- "!/**/__tests__/**"
69
+ "!/**/__tests__/**",
70
+ "!/**/__snapshots__/**"
70
71
  ],
71
72
  "size-limit": [
72
73
  {
@@ -76,15 +77,15 @@
76
77
  }
77
78
  ],
78
79
  "dependencies": {
79
- "@kubb/react-fabric": "0.13.1",
80
+ "@kubb/react-fabric": "0.13.2",
80
81
  "remeda": "^2.33.6",
81
- "@kubb/core": "4.29.1",
82
- "@kubb/oas": "4.29.1",
83
- "@kubb/plugin-oas": "4.29.1",
84
- "@kubb/plugin-ts": "4.29.1"
82
+ "@kubb/core": "4.31.0",
83
+ "@kubb/plugin-oas": "4.31.0",
84
+ "@kubb/oas": "4.31.0",
85
+ "@kubb/plugin-ts": "4.31.0"
85
86
  },
86
87
  "devDependencies": {
87
- "@asteasolutions/zod-to-openapi": "^8.4.1",
88
+ "@asteasolutions/zod-to-openapi": "^8.4.3",
88
89
  "zod": "^3.25.76"
89
90
  },
90
91
  "engines": {
@@ -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 test = z.union([
8
- z.object({
9
- propertyA: z.string(),
10
- }),
11
- z.object({
12
- propertyA: z.string(),
13
- propertyB: z.string(),
14
- }),
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.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,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.coerce.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,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.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,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.coerce.string(),
10
- date: z.optional(z.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,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 createItem200 = z.lazy(() => item)
11
-
12
- /**
13
- * @description Item to create
14
- */
15
- export const createItemMutationRequest = 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 createItemMutationResponse = z.lazy(() => createItem200)
@@ -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 createItem200 = z.lazy(() => item)
11
-
12
- /**
13
- * @description Item to create
14
- */
15
- export const createItemMutationRequest = 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 createItemMutationResponse = z.lazy(() => createItem200)
@@ -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
- /**
8
- * @description Null response
9
- */
10
- export const createPets201 = z.unknown()
11
-
12
- /**
13
- * @description unexpected error
14
- */
15
- export const createPetsError = z.lazy(() => error)
16
-
17
- export const createPetsMutationRequest = z.object({
18
- name: z.string(),
19
- tag: z.string(),
20
- })
21
-
22
- export const createPetsMutationResponse = z.lazy(() => createPets201)
@@ -1,13 +0,0 @@
1
- /**
2
- * @description Null response
3
- */
4
- export const createPetWithUnknownTypeAny = z.any()
5
-
6
- /**
7
- * @description unexpected error
8
- */
9
- export const createPetWithUnknownTypeAny = z.lazy(() => createPetWithUnknownTypeAny)
10
-
11
- export const createPetWithUnknownTypeAny = z.object({ name: z.string(), tag: z.string() })
12
-
13
- export const createPetWithUnknownTypeAny = z.any()
@@ -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
- /**
8
- * @description Null response
9
- */
10
- export const createPets201 = z.unknown()
11
-
12
- /**
13
- * @description unexpected error
14
- */
15
- export const createPetsError = z.lazy(() => error)
16
-
17
- export const createPetsMutationRequest = z.object({
18
- name: z.string(),
19
- tag: z.string(),
20
- })
21
-
22
- export const createPetsMutationResponse = z.lazy(() => createPets201)
@@ -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
- /**
8
- * @description Null response
9
- */
10
- export const createPets201 = z.unknown()
11
-
12
- /**
13
- * @description unexpected error
14
- */
15
- export const createPetsError = z
16
- .lazy(() => error)
17
- .openapi({
18
- examples: [
19
- { sample: { summary: 'A sample error', value: { code: 1, message: 'A sample error message' } } },
20
- { other_example: { summary: 'Another sample error', value: { code: 2, message: 'A totally specific message' } } },
21
- ],
22
- })
23
-
24
- export const createPetsMutationRequest = z.object({
25
- name: z.string().openapi({ example: 'Baxter' }),
26
- tag: z.string(),
27
- })
28
-
29
- export const createPetsMutationResponse = z.lazy(() => createPets201)
@@ -1,30 +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 Null response
9
- */
10
- export const createPets201 = z.unknown()
11
-
12
- /**
13
- * @description unexpected error
14
- */
15
- export const createPetsError = extendApi(
16
- z.lazy(() => error),
17
- {
18
- examples: [
19
- { sample: { summary: 'A sample error', value: { code: 1, message: 'A sample error message' } } },
20
- { other_example: { summary: 'Another sample error', value: { code: 2, message: 'A totally specific message' } } },
21
- ],
22
- },
23
- )
24
-
25
- export const createPetsMutationRequest = z.object({
26
- name: extendApi(z.string(), { example: 'Baxter' }),
27
- tag: z.string(),
28
- })
29
-
30
- export const createPetsMutationResponse = z.lazy(() => createPets201)
@@ -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
- /**
8
- * @description Null response
9
- */
10
- export const createPets201 = z.unknown()
11
-
12
- /**
13
- * @description unexpected error
14
- */
15
- export const createPetsError = z
16
- .lazy(() => error)
17
- .openapi({
18
- examples: [
19
- { sample: { summary: 'A sample error', value: { code: 1, message: 'A sample error message' } } },
20
- { other_example: { summary: 'Another sample error', value: { code: 2, message: 'A totally specific message' } } },
21
- ],
22
- })
23
-
24
- export const createPetsMutationRequest = z.object({
25
- name: z.string().openapi({ example: 'Baxter' }),
26
- tag: z.string(),
27
- })
28
-
29
- export const createPetsMutationResponse = z.lazy(() => createPets201)
@@ -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 deletePetPathParams = z.object({
8
- petId: z.coerce.number().int().describe('Pet id to delete'),
9
- })
10
-
11
- export const deletePetHeaderParams = z
12
- .object({
13
- api_key: z.optional(z.string()),
14
- })
15
- .optional()
16
-
17
- /**
18
- * @description Invalid pet value
19
- */
20
- export const deletePet400 = z.unknown()
21
-
22
- export const deletePetMutationResponse = z.unknown()
@@ -1,22 +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 deletePetPathParams = z.object({
8
- petId: z.coerce.number().int().describe('Pet id to delete'),
9
- })
10
-
11
- export const deletePetHeaderParams = z
12
- .object({
13
- api_key: z.optional(z.string()),
14
- })
15
- .optional()
16
-
17
- /**
18
- * @description Invalid pet value
19
- */
20
- export const deletePet400 = z.unknown()
21
-
22
- export const deletePetMutationResponse = z.unknown()
@@ -1,36 +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 advanced = z.union([
8
- z
9
- .lazy(() => enumerationValueSpecificationDto)
10
- .and(
11
- z.object({
12
- type: z.literal('enum'),
13
- }),
14
- ),
15
- z
16
- .lazy(() => rangeValueSpecificationDto)
17
- .and(
18
- z.object({
19
- type: z.literal('range'),
20
- }),
21
- ),
22
- z
23
- .lazy(() => regexValueSpecificationDto)
24
- .and(
25
- z.object({
26
- type: z.literal('regex'),
27
- }),
28
- ),
29
- z
30
- .lazy(() => sliderValueSpecificationDto)
31
- .and(
32
- z.object({
33
- type: z.literal('slider'),
34
- }),
35
- ),
36
- ])
@@ -1,7 +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 enumBooleanLiteral = z.union([z.literal(true), z.literal(false)])
@@ -1,7 +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 enumNamesType = z.enum(['0', '1'])
@@ -1,7 +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 enumNullable = z.enum(['Pending', 'Received']).nullable()
@@ -1,7 +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 enumSingleLiteral = z.literal(0)
@@ -1,7 +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 enumVarNamesType = z.union([z.literal(0), z.literal(1)])
@@ -1,9 +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 example = z.object({
8
- nestedExamples: z.optional(z.lazy(() => example)),
9
- })
@@ -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 exclusiveNumbers = z.object({
8
- exclusiveMin: z.optional(z.number().gt(0)),
9
- exclusiveMax: z.optional(z.number().lt(10)),
10
- exclusiveRange: z.number().gt(0.01).lt(9.99),
11
- strictMinExclusiveMaxRange: z.optional(z.number().min(0).lt(1000)),
12
- strictMaxExclusiveMinRange: z.optional(z.number().max(1000).gt(0)),
13
- exclusiveIntRange: z.optional(z.number().int().gt(0).lt(9)),
14
- })
@@ -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 listPetsQueryParams = z.object({
8
- limit: z.optional(z.string().describe('How many items to return at one time (max 100)')),
9
- offset: z.coerce.number().int().default(0),
10
- })
11
-
12
- /**
13
- * @description A paged array of pets
14
- */
15
- export const listPets200 = z.lazy(() => pets)
16
-
17
- /**
18
- * @description unexpected error
19
- */
20
- export const listPetsError = z.lazy(() => error)
21
-
22
- export const listPetsQueryResponse = z.lazy(() => listPets200)
@@ -1,101 +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
8
- .object({
9
- petId: z
10
- .string()
11
- .describe('The id of the pet to retrieve')
12
- .openapi({ examples: [{ description: 'The id of the pet to retrieve', type: 'string' }] }),
13
- testId: z
14
- .string()
15
- .describe('The id of the pet to retrieve')
16
- .openapi({ examples: [{ description: 'The id of the pet to retrieve', type: 'string' }] }),
17
- })
18
- .openapi({
19
- examples: [
20
- {
21
- type: 'object',
22
- required: ['petId', 'testId'],
23
- properties: {
24
- petId: { description: 'The id of the pet to retrieve', type: 'string' },
25
- testId: { description: 'The id of the pet to retrieve', type: 'string' },
26
- },
27
- },
28
- ],
29
- })
30
-
31
- export const showPetByIdQueryParams = z
32
- .object({
33
- queryFilter: z.optional(
34
- z
35
- .string()
36
- .optional()
37
- .transform((val) => (val ? val.split(',') : undefined))
38
- .pipe(z.array(z.enum(['DOGS', 'CATS', 'RABBITS'])).describe('A string array query parameter example')),
39
- ),
40
- })
41
- .optional()
42
- .openapi({
43
- examples: [
44
- {
45
- type: 'object',
46
- required: [],
47
- properties: {
48
- queryFilter: { description: 'A string array query parameter example', type: 'array', items: { type: 'string', enum: ['DOGS', 'CATS', 'RABBITS'] } },
49
- },
50
- },
51
- ],
52
- })
53
-
54
- /**
55
- * @description Expected response to a valid request
56
- */
57
- export const showPetById200 = z
58
- .lazy(() => pet)
59
- .openapi({
60
- examples: [
61
- {
62
- $ref: '#/components/schemas/Pet',
63
- type: 'object',
64
- required: ['id', 'name'],
65
- properties: { id: { type: 'integer', format: 'int64' }, name: { type: 'string' }, tag: { type: 'string' } },
66
- },
67
- ],
68
- })
69
-
70
- /**
71
- * @description unexpected error
72
- */
73
- export const showPetByIdError = z
74
- .lazy(() => error)
75
- .openapi({
76
- examples: [
77
- {
78
- $ref: '#/components/schemas/Error',
79
- type: 'object',
80
- required: ['code', 'message'],
81
- properties: { code: { type: 'integer', format: 'int32' }, message: { type: 'string' } },
82
- },
83
- ],
84
- })
85
-
86
- export const showPetByIdQueryResponse = z
87
- .lazy(() => showPetById200)
88
- .openapi({
89
- examples: [
90
- {
91
- oneOf: [
92
- {
93
- $ref: 'showPetById200',
94
- type: 'object',
95
- required: ['id', 'name'],
96
- properties: { id: { type: 'integer', format: 'int64' }, name: { type: 'string' }, tag: { type: 'string' } },
97
- },
98
- ],
99
- },
100
- ],
101
- })
@@ -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 listPetsQueryParams = z.object({
8
- limit: z.optional(z.string().describe('How many items to return at one time (max 100)')),
9
- offset: z.coerce.number().int().default(0),
10
- })
11
-
12
- /**
13
- * @description A paged array of pets
14
- */
15
- export const listPets200 = z.lazy(() => pets)
16
-
17
- /**
18
- * @description unexpected error
19
- */
20
- export const listPetsError = 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 listPetsQueryResponse = z.lazy(() => listPets200)
@@ -1,7 +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 image = z.string().nullable()
@@ -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 This probably should fail miserably
9
- */
10
- export const mixedValueTypeConst = z
11
- .object({
12
- foobar: z.literal('foobar'),
13
- })
14
- .describe('This probably should fail miserably')