@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.
Files changed (66) hide show
  1. package/dist/components.d.ts +4 -4
  2. package/dist/generators.d.ts +4 -4
  3. package/dist/index.d.ts +2 -2
  4. package/dist/templates/ToZod.source.d.ts +1 -1
  5. package/package.json +9 -8
  6. package/dist/types-Cfvq128m.d.ts +0 -172
  7. package/src/generators/__snapshots__/anyof.ts +0 -15
  8. package/src/generators/__snapshots__/coercion.ts +0 -15
  9. package/src/generators/__snapshots__/coercionDates.ts +0 -15
  10. package/src/generators/__snapshots__/coercionNumbers.ts +0 -15
  11. package/src/generators/__snapshots__/coercionStrings.ts +0 -15
  12. package/src/generators/__snapshots__/createItemUnionWithReadOnly.ts +0 -34
  13. package/src/generators/__snapshots__/createItemUnionWithReadOnly_wrapOutput.ts +0 -34
  14. package/src/generators/__snapshots__/createPet.ts +0 -22
  15. package/src/generators/__snapshots__/createPetWithUnknownTypeAny.ts +0 -13
  16. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +0 -22
  17. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput.ts +0 -29
  18. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput_entire_.ts +0 -30
  19. package/src/generators/__snapshots__/createPet_wrapOutput.ts +0 -29
  20. package/src/generators/__snapshots__/deletePet.ts +0 -22
  21. package/src/generators/__snapshots__/deletePet_wrapOutput.ts +0 -22
  22. package/src/generators/__snapshots__/discriminator.ts +0 -36
  23. package/src/generators/__snapshots__/enumBooleanLiteral.ts +0 -7
  24. package/src/generators/__snapshots__/enumNamesType.ts +0 -7
  25. package/src/generators/__snapshots__/enumNullable.ts +0 -7
  26. package/src/generators/__snapshots__/enumSingleLiteral.ts +0 -7
  27. package/src/generators/__snapshots__/enumVarNamesType.ts +0 -7
  28. package/src/generators/__snapshots__/example.ts +0 -9
  29. package/src/generators/__snapshots__/exclusiveNumbers.ts +0 -14
  30. package/src/generators/__snapshots__/getPets.ts +0 -22
  31. package/src/generators/__snapshots__/getPetsWithQueryFilter_wrapOutput_all_.ts +0 -101
  32. package/src/generators/__snapshots__/getPets_wrapOutput.ts +0 -29
  33. package/src/generators/__snapshots__/imageNullable.ts +0 -7
  34. package/src/generators/__snapshots__/mixedValueTypeConst.ts +0 -14
  35. package/src/generators/__snapshots__/nullable.ts +0 -11
  36. package/src/generators/__snapshots__/nullableString.ts +0 -7
  37. package/src/generators/__snapshots__/nullableStringUuid.ts +0 -7
  38. package/src/generators/__snapshots__/nullableStringWithAnyOf.ts +0 -7
  39. package/src/generators/__snapshots__/numberValueConst.ts +0 -14
  40. package/src/generators/__snapshots__/oneof.ts +0 -14
  41. package/src/generators/__snapshots__/operations.ts +0 -106
  42. package/src/generators/__snapshots__/optionalPetInfer.ts +0 -13
  43. package/src/generators/__snapshots__/optionalPetTyped.ts +0 -12
  44. package/src/generators/__snapshots__/order.ts +0 -14
  45. package/src/generators/__snapshots__/orderDateTyeString.ts +0 -10
  46. package/src/generators/__snapshots__/orderDateTypeFalse.ts +0 -14
  47. package/src/generators/__snapshots__/orderDateTypeString.ts +0 -14
  48. package/src/generators/__snapshots__/pet.ts +0 -15
  49. package/src/generators/__snapshots__/petArray.ts +0 -14
  50. package/src/generators/__snapshots__/petCoercion.ts +0 -15
  51. package/src/generators/__snapshots__/petTupleObject.ts +0 -14
  52. package/src/generators/__snapshots__/petV4.ts +0 -15
  53. package/src/generators/__snapshots__/petV4Guid.ts +0 -15
  54. package/src/generators/__snapshots__/petWithMapper.ts +0 -15
  55. package/src/generators/__snapshots__/pets.ts +0 -14
  56. package/src/generators/__snapshots__/queryAllDefaulted.ts +0 -19
  57. package/src/generators/__snapshots__/queryAllDefaulted_wrapOutput.ts +0 -19
  58. package/src/generators/__snapshots__/recursive.ts +0 -10
  59. package/src/generators/__snapshots__/showPetById.ts +0 -22
  60. package/src/generators/__snapshots__/showPetById_wrapOutput.ts +0 -29
  61. package/src/generators/__snapshots__/stringValueConst.ts +0 -14
  62. package/src/generators/__snapshots__/toy.ts +0 -13
  63. package/src/generators/__snapshots__/unionWithReadOnly.ts +0 -28
  64. package/src/generators/__snapshots__/updateItemUnionWithReadOnly.ts +0 -34
  65. package/src/generators/__snapshots__/updateItemUnionWithReadOnly_wrapOutput.ts +0 -34
  66. package/src/generators/__snapshots__/uuidSchema.ts +0 -7
@@ -1,9 +1,9 @@
1
- import { t as __name } from "./chunk-cy2TeOE5.cjs";
2
- import { n as PluginZod } from "./types-Cfvq128m.js";
3
- import { Operation, SchemaObject } from "@kubb/oas";
1
+ import { t as __name } from "./chunk-DKWOrOAv.js";
2
+ import { n as PluginZod } from "./types-B-1DRHH9.js";
3
+ import { Schema } from "@kubb/plugin-oas";
4
4
  import { SchemaNames } from "@kubb/plugin-oas/hooks";
5
+ import { Operation, SchemaObject } from "@kubb/oas";
5
6
  import { FabricReactNode } from "@kubb/react-fabric/types";
6
- import { Schema } from "@kubb/plugin-oas";
7
7
 
8
8
  //#region src/components/Operations.d.ts
9
9
  type Props$1 = {
@@ -1,11 +1,11 @@
1
- import { t as __name } from "./chunk-cy2TeOE5.cjs";
2
- import { n as PluginZod } from "./types-Cfvq128m.js";
1
+ import { t as __name } from "./chunk-DKWOrOAv.js";
2
+ import { n as PluginZod } from "./types-B-1DRHH9.js";
3
+ import { BaseGenerator, Config, FileMetaBase, Group, KubbEvents, Output, Plugin, PluginFactoryOptions, PluginManager, ResolveNameParams } from "@kubb/core";
4
+ import { Fabric } from "@kubb/react-fabric";
3
5
  import { HttpMethod, Oas, Operation, SchemaObject, contentType } from "@kubb/oas";
4
6
  import { FabricReactNode } from "@kubb/react-fabric/types";
5
- import { BaseGenerator, Config, FileMetaBase, Group, KubbEvents, Output, Plugin, PluginFactoryOptions, PluginManager, ResolveNameParams } from "@kubb/core";
6
7
  import { AsyncEventEmitter } from "@kubb/core/utils";
7
8
  import { KubbFile } from "@kubb/fabric-core/types";
8
- import { Fabric } from "@kubb/react-fabric";
9
9
 
10
10
  //#region ../plugin-oas/src/types.d.ts
11
11
  type GetOasOptions = {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as __name } from "./chunk-cy2TeOE5.cjs";
2
- import { n as PluginZod, t as Options } from "./types-Cfvq128m.js";
1
+ import { t as __name } from "./chunk-DKWOrOAv.js";
2
+ import { n as PluginZod, t as Options } from "./types-B-1DRHH9.js";
3
3
  import * as _kubb_core0 from "@kubb/core";
4
4
 
5
5
  //#region src/plugin.d.ts
@@ -1,4 +1,4 @@
1
- import { t as __name } from "../chunk-cy2TeOE5.cjs";
1
+ import { t as __name } from "../chunk-DKWOrOAv.js";
2
2
 
3
3
  //#region src/templates/ToZod.source.d.ts
4
4
  declare const source: string;
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.1",
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.3",
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.1",
83
+ "@kubb/oas": "4.31.1",
84
+ "@kubb/plugin-oas": "4.31.1",
85
+ "@kubb/plugin-ts": "4.31.1"
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,172 +0,0 @@
1
- import { t as __name } from "./chunk-cy2TeOE5.cjs";
2
- import { Oas, SchemaObject, contentType } from "@kubb/oas";
3
- import { Exclude, Include, Override, ResolvePathOptions, Schema } from "@kubb/plugin-oas";
4
- import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
5
- import { Generator } from "@kubb/plugin-oas/generators";
6
-
7
- //#region src/types.d.ts
8
- type Options = {
9
- /**
10
- * @default 'zod'
11
- */
12
- output?: Output<Oas>;
13
- /**
14
- * Define which contentType should be used.
15
- * By default, the first JSON valid mediaType is used
16
- */
17
- contentType?: contentType;
18
- /**
19
- * Group the Zod schemas based on the provided name.
20
- */
21
- group?: Group;
22
- /**
23
- * Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
24
- */
25
- exclude?: Array<Exclude>;
26
- /**
27
- * Array containing include parameters to include tags/operations/methods/paths.
28
- */
29
- include?: Array<Include>;
30
- /**
31
- * Array containing override parameters to override `options` based on tags/operations/methods/paths.
32
- */
33
- override?: Array<Override<ResolvedOptions>>;
34
- /**
35
- * Path to Zod
36
- * It used as `import { z } from '${importPath}'`.
37
- * Accepts relative and absolute paths.
38
- * Path is used as-is; relative paths are based on the generated file location.
39
- * @default 'zod'
40
- */
41
- importPath?: string;
42
- /**
43
- * Choose to use date or datetime as JavaScript Date instead of string.
44
- * - false falls back to a simple z.string() format.
45
- * - 'string' uses z.string().datetime() for datetime validation.
46
- * - 'stringOffset' uses z.string().datetime({ offset: true }) for datetime with timezone offset validation.
47
- * - 'stringLocal' uses z.string().datetime({ local: true }) for local datetime validation.
48
- * - 'date' uses z.date() for JavaScript Date objects.
49
- * @default 'string'
50
- * @note 'stringOffset' will become the default in Kubb v3.
51
- */
52
- dateType?: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
53
- /**
54
- * Choose to use `number` or `bigint` for integer fields with `int64` format.
55
- * - 'number' uses the JavaScript `number` type (matches JSON.parse() runtime behavior).
56
- * - 'bigint' uses the JavaScript `bigint` type (accurate for values exceeding Number.MAX_SAFE_INTEGER).
57
- * @note in v5 of Kubb 'bigint' will become the default to better align with OpenAPI's int64 specification.
58
- * @default 'number'
59
- */
60
- integerType?: 'number' | 'bigint';
61
- /**
62
- * Which type to use when the Swagger/OpenAPI file is not providing more information.
63
- * - 'any' allows any value.
64
- * - 'unknown' requires type narrowing before use.
65
- * - 'void' represents no value.
66
- * @default 'any'
67
- */
68
- unknownType?: 'any' | 'unknown' | 'void';
69
- /**
70
- * Which type to use for empty schema values.
71
- * - 'any' allows any value.
72
- * - 'unknown' requires type narrowing before use.
73
- * - 'void' represents no value.
74
- * @default `unknownType`
75
- */
76
- emptySchemaType?: 'any' | 'unknown' | 'void';
77
- /**
78
- * Use TypeScript(`@kubb/plugin-ts`) to add type annotation.
79
- */
80
- typed?: boolean;
81
- /**
82
- * Return Zod generated schema as type with z.infer<TYPE>
83
- */
84
- inferred?: boolean;
85
- /**
86
- * Use of z.coerce.string() instead of z.string()
87
- * can also be an object to enable coercion for dates, strings, and numbers
88
- */
89
- coercion?: boolean | {
90
- dates?: boolean;
91
- strings?: boolean;
92
- numbers?: boolean;
93
- };
94
- operations?: boolean;
95
- mapper?: Record<string, string>;
96
- transformers?: {
97
- /**
98
- * Customize the names based on the type that is provided by the plugin.
99
- */
100
- name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
101
- /**
102
- * Receive schema and baseName(propertyName) and return FakerMeta array
103
- * TODO TODO add docs
104
- * @beta
105
- */
106
- schema?: (props: {
107
- schema: SchemaObject | null;
108
- name: string | null;
109
- parentName: string | null;
110
- }, defaultSchemas: Schema[]) => Schema[] | undefined;
111
- };
112
- /**
113
- * Which version of Zod should be used.
114
- * - '3' uses Zod v3.x syntax and features.
115
- * - '4' uses Zod v4.x syntax and features.
116
- * @default '3'
117
- */
118
- version?: '3' | '4';
119
- /**
120
- * Which Zod GUID validator to use for OpenAPI `format: uuid`.
121
- * - 'uuid' uses UUID validation.
122
- * - 'guid' uses GUID validation (Zod v4 only).
123
- * @default 'uuid'
124
- */
125
- guidType?: 'uuid' | 'guid';
126
- /**
127
- * Use Zod Mini's functional API for better tree-shaking support.
128
- * When enabled, generates functional syntax (e.g., `z.optional(z.string())`) instead of chainable methods (e.g., `z.string().optional()`).
129
- * Requires Zod v4 or later. When `mini: true`, `version` is set to '4' and `importPath` will default to 'zod/mini'.
130
- * @default false
131
- */
132
- mini?: boolean;
133
- /**
134
- * Callback function to wrap the output of the generated zod schema
135
- *
136
- * This is useful for edge case scenarios where you might leverage something like `z.object({ ... }).openapi({ example: { some: "complex-example" }})`
137
- * or `extendApi(z.object({ ... }), { example: { some: "complex-example", ...otherOpenApiProperties }})`
138
- * while going from openapi -> zod -> openapi
139
- */
140
- wrapOutput?: (arg: {
141
- output: string;
142
- schema: SchemaObject;
143
- }) => string | undefined;
144
- /**
145
- * Define some generators next to the zod generators
146
- */
147
- generators?: Array<Generator<PluginZod>>;
148
- };
149
- type ResolvedOptions = {
150
- output: Output<Oas>;
151
- group: Options['group'];
152
- override: NonNullable<Options['override']>;
153
- transformers: NonNullable<Options['transformers']>;
154
- dateType: NonNullable<Options['dateType']>;
155
- integerType: NonNullable<Options['integerType']>;
156
- unknownType: NonNullable<Options['unknownType']>;
157
- emptySchemaType: NonNullable<Options['emptySchemaType']>;
158
- typed: NonNullable<Options['typed']>;
159
- inferred: NonNullable<Options['inferred']>;
160
- mapper: NonNullable<Options['mapper']>;
161
- importPath: NonNullable<Options['importPath']>;
162
- coercion: NonNullable<Options['coercion']>;
163
- operations: NonNullable<Options['operations']>;
164
- wrapOutput: Options['wrapOutput'];
165
- version: NonNullable<Options['version']>;
166
- guidType: NonNullable<Options['guidType']>;
167
- mini: NonNullable<Options['mini']>;
168
- };
169
- type PluginZod = PluginFactoryOptions<'plugin-zod', Options, ResolvedOptions, never, ResolvePathOptions>;
170
- //#endregion
171
- export { PluginZod as n, Options as t };
172
- //# sourceMappingURL=types-Cfvq128m.d.ts.map
@@ -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()