zod-openapi 5.4.5 → 6.0.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/README.md +3 -3
- package/api/package.json +7 -3
- package/lib/api.cjs +6 -0
- package/lib/api.d.cts +7 -0
- package/lib/api.d.mts +7 -0
- package/{dist → lib}/api.mjs +2 -3
- package/{dist/components-fd4LXedu.cjs → lib/components-BDEwP6Uu.cjs} +249 -212
- package/{dist/components-B1DX_zYv.d.mts → lib/components-DfsFcO5r.d.cts} +99 -16
- package/{dist/components-D3KCJ9k6.d.cts → lib/components-DfsFcO5r.d.mts} +99 -16
- package/{dist/components-WUsO5AOL.mjs → lib/components-DgApn4JL.mjs} +219 -182
- package/{dist → lib}/index.cjs +2 -13
- package/lib/index.d.cts +332 -0
- package/lib/index.d.mts +332 -0
- package/{dist → lib}/index.mjs +2 -8
- package/package.json +20 -27
- package/api/index.d.cts +0 -1
- package/api/index.d.ts +0 -1
- package/dist/api.cjs +0 -6
- package/dist/api.d.cts +0 -11
- package/dist/api.d.mts +0 -11
- package/dist/index.d.cts +0 -32
- package/dist/index.d.mts +0 -32
|
@@ -1,18 +1,24 @@
|
|
|
1
|
+
import * as core from "zod/v4/core";
|
|
1
2
|
import { $ZodType, $ZodTypes, JSONSchemaMeta, toJSONSchema } from "zod/v4/core";
|
|
2
3
|
|
|
3
4
|
//#region src/openapi.d.ts
|
|
4
|
-
declare const openApiVersions: readonly ["3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.1.0", "3.1.1"];
|
|
5
|
+
declare const openApiVersions: readonly ["3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.1.0", "3.1.1", "3.2.0"];
|
|
5
6
|
type OpenApiVersion = (typeof openApiVersions)[number];
|
|
6
7
|
//#endregion
|
|
7
|
-
//#region
|
|
8
|
+
//#region src/zod.d.ts
|
|
9
|
+
declare const isAnyZodType: (schema: unknown) => schema is core.$ZodTypes;
|
|
10
|
+
type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
|
|
11
|
+
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region packages/openapi3-ts/src/dist/model/specification-extension.d.ts
|
|
8
14
|
type IExtensionName = `x-${string}`;
|
|
9
15
|
type IExtensionType = any;
|
|
10
16
|
type ISpecificationExtension = {
|
|
11
17
|
[extensionName: IExtensionName]: IExtensionType;
|
|
12
18
|
};
|
|
13
19
|
//#endregion
|
|
14
|
-
//#region packages/openapi3-ts/
|
|
15
|
-
interface ServerObject extends ISpecificationExtension {
|
|
20
|
+
//#region packages/openapi3-ts/src/dist/model/oas-common.d.ts
|
|
21
|
+
interface ServerObject$1 extends ISpecificationExtension {
|
|
16
22
|
url: string;
|
|
17
23
|
description?: string;
|
|
18
24
|
variables?: {
|
|
@@ -25,10 +31,20 @@ interface ServerVariableObject extends ISpecificationExtension {
|
|
|
25
31
|
description?: string;
|
|
26
32
|
}
|
|
27
33
|
//#endregion
|
|
28
|
-
//#region packages/openapi3-ts/
|
|
34
|
+
//#region packages/openapi3-ts/src/dist/model/openapi32.d.ts
|
|
35
|
+
interface ServerObject extends ISpecificationExtension {
|
|
36
|
+
url: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
variables?: {
|
|
40
|
+
[v: string]: ServerVariableObject;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
29
43
|
interface OpenAPIObject extends ISpecificationExtension {
|
|
30
44
|
openapi: string;
|
|
45
|
+
$self?: string;
|
|
31
46
|
info: InfoObject;
|
|
47
|
+
jsonSchemaDialect?: string;
|
|
32
48
|
servers?: ServerObject[];
|
|
33
49
|
paths?: PathsObject;
|
|
34
50
|
components?: ComponentsObject;
|
|
@@ -39,6 +55,7 @@ interface OpenAPIObject extends ISpecificationExtension {
|
|
|
39
55
|
}
|
|
40
56
|
interface InfoObject extends ISpecificationExtension {
|
|
41
57
|
title: string;
|
|
58
|
+
summary?: string;
|
|
42
59
|
description?: string;
|
|
43
60
|
termsOfService?: string;
|
|
44
61
|
contact?: ContactObject;
|
|
@@ -86,6 +103,9 @@ interface ComponentsObject extends ISpecificationExtension {
|
|
|
86
103
|
pathItems?: {
|
|
87
104
|
[pathItem: string]: PathItemObject | ReferenceObject;
|
|
88
105
|
};
|
|
106
|
+
mediaTypes?: {
|
|
107
|
+
[mediaType: string]: MediaTypeObject | ReferenceObject;
|
|
108
|
+
};
|
|
89
109
|
}
|
|
90
110
|
interface PathsObject extends ISpecificationExtension {
|
|
91
111
|
[path: string]: PathItemObject;
|
|
@@ -103,6 +123,10 @@ interface PathItemObject extends ISpecificationExtension {
|
|
|
103
123
|
head?: OperationObject;
|
|
104
124
|
patch?: OperationObject;
|
|
105
125
|
trace?: OperationObject;
|
|
126
|
+
query?: OperationObject;
|
|
127
|
+
additionalOperations?: {
|
|
128
|
+
[method: string]: OperationObject;
|
|
129
|
+
};
|
|
106
130
|
servers?: ServerObject[];
|
|
107
131
|
parameters?: (ParameterObject | ReferenceObject)[];
|
|
108
132
|
}
|
|
@@ -124,8 +148,8 @@ interface ExternalDocumentationObject extends ISpecificationExtension {
|
|
|
124
148
|
description?: string;
|
|
125
149
|
url: string;
|
|
126
150
|
}
|
|
127
|
-
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
128
|
-
type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
151
|
+
type ParameterLocation = 'query' | 'querystring' | 'header' | 'path' | 'cookie';
|
|
152
|
+
type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject' | 'cookie';
|
|
129
153
|
interface BaseParameterObject extends ISpecificationExtension {
|
|
130
154
|
description?: string;
|
|
131
155
|
required?: boolean;
|
|
@@ -151,13 +175,16 @@ interface RequestBodyObject extends ISpecificationExtension {
|
|
|
151
175
|
required?: boolean;
|
|
152
176
|
}
|
|
153
177
|
interface ContentObject {
|
|
154
|
-
[mediatype: string]: MediaTypeObject;
|
|
178
|
+
[mediatype: string]: MediaTypeObject | ReferenceObject;
|
|
155
179
|
}
|
|
156
180
|
interface MediaTypeObject extends ISpecificationExtension {
|
|
157
181
|
schema?: SchemaObject | ReferenceObject;
|
|
182
|
+
itemSchema?: SchemaObject | ReferenceObject;
|
|
158
183
|
examples?: ExamplesObject;
|
|
159
184
|
example?: any;
|
|
160
185
|
encoding?: EncodingObject;
|
|
186
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
187
|
+
itemEncoding?: EncodingPropertyObject;
|
|
161
188
|
}
|
|
162
189
|
interface EncodingObject extends ISpecificationExtension {
|
|
163
190
|
[property: string]: EncodingPropertyObject | any;
|
|
@@ -170,6 +197,9 @@ interface EncodingPropertyObject {
|
|
|
170
197
|
style?: string;
|
|
171
198
|
explode?: boolean;
|
|
172
199
|
allowReserved?: boolean;
|
|
200
|
+
encoding?: EncodingObject;
|
|
201
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
202
|
+
itemEncoding?: EncodingPropertyObject;
|
|
173
203
|
[key: string]: any;
|
|
174
204
|
}
|
|
175
205
|
interface ResponsesObject extends ISpecificationExtension {
|
|
@@ -177,7 +207,8 @@ interface ResponsesObject extends ISpecificationExtension {
|
|
|
177
207
|
[statuscode: string]: ResponseObject | ReferenceObject | any;
|
|
178
208
|
}
|
|
179
209
|
interface ResponseObject extends ISpecificationExtension {
|
|
180
|
-
|
|
210
|
+
summary?: string;
|
|
211
|
+
description?: string;
|
|
181
212
|
headers?: HeadersObject;
|
|
182
213
|
content?: ContentObject;
|
|
183
214
|
links?: LinksObject;
|
|
@@ -194,6 +225,8 @@ interface HeadersObject {
|
|
|
194
225
|
interface ExampleObject {
|
|
195
226
|
summary?: string;
|
|
196
227
|
description?: string;
|
|
228
|
+
dataValue?: any;
|
|
229
|
+
serializedValue?: string;
|
|
197
230
|
value?: any;
|
|
198
231
|
externalValue?: string;
|
|
199
232
|
[property: string]: any;
|
|
@@ -218,8 +251,11 @@ interface HeaderObject extends BaseParameterObject {
|
|
|
218
251
|
}
|
|
219
252
|
interface TagObject extends ISpecificationExtension {
|
|
220
253
|
name: string;
|
|
254
|
+
summary?: string;
|
|
221
255
|
description?: string;
|
|
222
256
|
externalDocs?: ExternalDocumentationObject;
|
|
257
|
+
parent?: string;
|
|
258
|
+
kind?: string;
|
|
223
259
|
[extension: string]: any;
|
|
224
260
|
}
|
|
225
261
|
interface ExamplesObject {
|
|
@@ -231,8 +267,18 @@ interface ReferenceObject {
|
|
|
231
267
|
description?: string;
|
|
232
268
|
}
|
|
233
269
|
type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
|
|
234
|
-
|
|
270
|
+
type SchemaObject = SchemaObjectValue | boolean;
|
|
271
|
+
interface SchemaObjectValue extends ISpecificationExtension {
|
|
272
|
+
[keyword: string]: any;
|
|
235
273
|
$ref?: string;
|
|
274
|
+
$schema?: string;
|
|
275
|
+
$id?: string;
|
|
276
|
+
$anchor?: string;
|
|
277
|
+
$dynamicRef?: string;
|
|
278
|
+
$dynamicAnchor?: string;
|
|
279
|
+
$defs?: {
|
|
280
|
+
[schema: string]: SchemaObject | ReferenceObject;
|
|
281
|
+
};
|
|
236
282
|
discriminator?: DiscriminatorObject;
|
|
237
283
|
readOnly?: boolean;
|
|
238
284
|
writeOnly?: boolean;
|
|
@@ -248,11 +294,26 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
248
294
|
anyOf?: (SchemaObject | ReferenceObject)[];
|
|
249
295
|
not?: SchemaObject | ReferenceObject;
|
|
250
296
|
items?: SchemaObject | ReferenceObject;
|
|
297
|
+
contains?: SchemaObject | ReferenceObject;
|
|
251
298
|
properties?: {
|
|
252
299
|
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
253
300
|
};
|
|
254
301
|
additionalProperties?: SchemaObject | ReferenceObject | boolean;
|
|
255
302
|
propertyNames?: SchemaObject | ReferenceObject;
|
|
303
|
+
patternProperties?: {
|
|
304
|
+
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
305
|
+
};
|
|
306
|
+
dependentSchemas?: {
|
|
307
|
+
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
308
|
+
};
|
|
309
|
+
dependentRequired?: {
|
|
310
|
+
[propertyName: string]: string[];
|
|
311
|
+
};
|
|
312
|
+
if?: SchemaObject | ReferenceObject;
|
|
313
|
+
then?: SchemaObject | ReferenceObject;
|
|
314
|
+
else?: SchemaObject | ReferenceObject;
|
|
315
|
+
unevaluatedItems?: SchemaObject | ReferenceObject | boolean;
|
|
316
|
+
unevaluatedProperties?: SchemaObject | ReferenceObject | boolean;
|
|
256
317
|
description?: string;
|
|
257
318
|
default?: any;
|
|
258
319
|
title?: string;
|
|
@@ -273,6 +334,7 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
273
334
|
required?: string[];
|
|
274
335
|
enum?: any[];
|
|
275
336
|
prefixItems?: (SchemaObject | ReferenceObject)[];
|
|
337
|
+
contentSchema?: SchemaObject | ReferenceObject;
|
|
276
338
|
contentMediaType?: string;
|
|
277
339
|
contentEncoding?: string;
|
|
278
340
|
}
|
|
@@ -284,15 +346,18 @@ interface DiscriminatorObject {
|
|
|
284
346
|
mapping?: {
|
|
285
347
|
[key: string]: string;
|
|
286
348
|
};
|
|
349
|
+
defaultMapping?: string;
|
|
287
350
|
}
|
|
351
|
+
type XmlNodeType = 'element' | 'attribute' | 'text' | 'cdata' | 'none';
|
|
288
352
|
interface XmlObject extends ISpecificationExtension {
|
|
353
|
+
nodeType?: XmlNodeType;
|
|
289
354
|
name?: string;
|
|
290
355
|
namespace?: string;
|
|
291
356
|
prefix?: string;
|
|
292
357
|
attribute?: boolean;
|
|
293
358
|
wrapped?: boolean;
|
|
294
359
|
}
|
|
295
|
-
type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
360
|
+
type SecuritySchemeType = 'apiKey' | 'http' | 'mutualTLS' | 'oauth2' | 'openIdConnect';
|
|
296
361
|
interface SecuritySchemeObject extends ISpecificationExtension {
|
|
297
362
|
type: SecuritySchemeType;
|
|
298
363
|
description?: string;
|
|
@@ -302,15 +367,19 @@ interface SecuritySchemeObject extends ISpecificationExtension {
|
|
|
302
367
|
bearerFormat?: string;
|
|
303
368
|
flows?: OAuthFlowsObject;
|
|
304
369
|
openIdConnectUrl?: string;
|
|
370
|
+
oauth2MetadataUrl?: string;
|
|
371
|
+
deprecated?: boolean;
|
|
305
372
|
}
|
|
306
373
|
interface OAuthFlowsObject extends ISpecificationExtension {
|
|
307
374
|
implicit?: OAuthFlowObject;
|
|
308
375
|
password?: OAuthFlowObject;
|
|
309
376
|
clientCredentials?: OAuthFlowObject;
|
|
310
377
|
authorizationCode?: OAuthFlowObject;
|
|
378
|
+
deviceAuthorization?: OAuthFlowObject;
|
|
311
379
|
}
|
|
312
380
|
interface OAuthFlowObject extends ISpecificationExtension {
|
|
313
381
|
authorizationUrl?: string;
|
|
382
|
+
deviceAuthorizationUrl?: string;
|
|
314
383
|
tokenUrl?: string;
|
|
315
384
|
refreshUrl?: string;
|
|
316
385
|
scopes: ScopesObject;
|
|
@@ -323,8 +392,6 @@ interface SecurityRequirementObject {
|
|
|
323
392
|
}
|
|
324
393
|
//#endregion
|
|
325
394
|
//#region src/types.d.ts
|
|
326
|
-
type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
|
|
327
|
-
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
|
|
328
395
|
type ZodOpenApiOverrideContext = OverrideParameters & {
|
|
329
396
|
io: 'input' | 'output';
|
|
330
397
|
};
|
|
@@ -379,8 +446,21 @@ declare module 'zod/v4' {
|
|
|
379
446
|
}
|
|
380
447
|
//#endregion
|
|
381
448
|
//#region src/create/document.d.ts
|
|
382
|
-
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema'> {
|
|
449
|
+
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema' | 'itemSchema' | 'encoding' | 'prefixEncoding' | 'itemEncoding'> {
|
|
383
450
|
schema?: $ZodType | SchemaObject | ReferenceObject;
|
|
451
|
+
itemSchema?: $ZodType | SchemaObject | ReferenceObject;
|
|
452
|
+
encoding?: ZodOpenApiEncodingObject;
|
|
453
|
+
prefixEncoding?: ZodOpenApiEncodingPropertyObject[];
|
|
454
|
+
itemEncoding?: ZodOpenApiEncodingPropertyObject;
|
|
455
|
+
}
|
|
456
|
+
interface ZodOpenApiEncodingObject extends ISpecificationExtension {
|
|
457
|
+
[property: string]: ZodOpenApiEncodingPropertyObject;
|
|
458
|
+
}
|
|
459
|
+
interface ZodOpenApiEncodingPropertyObject extends Omit<EncodingPropertyObject, 'headers' | 'encoding' | 'prefixEncoding' | 'itemEncoding'> {
|
|
460
|
+
headers?: ZodOpenApiHeadersObject;
|
|
461
|
+
encoding?: ZodOpenApiEncodingObject;
|
|
462
|
+
prefixEncoding?: ZodOpenApiEncodingPropertyObject[];
|
|
463
|
+
itemEncoding?: ZodOpenApiEncodingPropertyObject;
|
|
384
464
|
}
|
|
385
465
|
interface ZodOpenApiContentObject {
|
|
386
466
|
'application/json'?: ZodOpenApiMediaTypeObject;
|
|
@@ -419,7 +499,7 @@ interface ZodOpenApiOperationObject extends Omit<OperationObject, 'requestBody'
|
|
|
419
499
|
responses: ZodOpenApiResponsesObject;
|
|
420
500
|
callbacks?: ZodOpenApiCallbacksObject;
|
|
421
501
|
}
|
|
422
|
-
interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'> {
|
|
502
|
+
interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace' | 'query' | 'additionalOperations' | 'parameters'> {
|
|
423
503
|
get?: ZodOpenApiOperationObject;
|
|
424
504
|
put?: ZodOpenApiOperationObject;
|
|
425
505
|
post?: ZodOpenApiOperationObject;
|
|
@@ -428,6 +508,9 @@ interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' |
|
|
|
428
508
|
head?: ZodOpenApiOperationObject;
|
|
429
509
|
patch?: ZodOpenApiOperationObject;
|
|
430
510
|
trace?: ZodOpenApiOperationObject;
|
|
511
|
+
query?: ZodOpenApiOperationObject;
|
|
512
|
+
additionalOperations?: Record<string, ZodOpenApiOperationObject>;
|
|
513
|
+
parameters?: Array<$ZodType | ParameterObject | ReferenceObject>;
|
|
431
514
|
/**
|
|
432
515
|
* Used to register this path item as a component.
|
|
433
516
|
*/
|
|
@@ -632,4 +715,4 @@ interface ComponentRegistry {
|
|
|
632
715
|
declare const createRegistry: (components?: ZodOpenApiComponentsObject) => ComponentRegistry;
|
|
633
716
|
declare const createComponents: (registry: ComponentRegistry, opts: CreateDocumentOptions, openapiVersion?: OpenApiVersion) => ComponentsObject;
|
|
634
717
|
//#endregion
|
|
635
|
-
export {
|
|
718
|
+
export { LicenseObject as $, ZodOpenApiVersion as A, ServerObject$1 as At, CallbacksObject as B, ZodOpenApiPathItemObject as C, SecurityRequirementObject as Ct, ZodOpenApiResponsesObject as D, TagObject as Dt, ZodOpenApiResponseObject as E, ServerObject as Et, ZodOpenApiOverrideContext as F, isAnyZodType as Ft, EncodingObject as G, ContactObject as H, ZodOpenApiOverrideMeta as I, OpenApiVersion as It, ExamplesObject as J, EncodingPropertyObject as K, ZodOpenApiOverrideMetaContext as L, ZodOpenApiBaseMetadata as M, IExtensionName as Mt, ZodOpenApiMetadata as N, IExtensionType as Nt, ZodOpenApiSchemaObject as O, XmlNodeType as Ot, ZodOpenApiOverride as P, ISpecificationExtension as Pt, InfoObject as Q, BaseParameterObject as R, ZodOpenApiParameters as S, ScopesObject as St, ZodOpenApiRequestBodyObject as T, SecuritySchemeType as Tt, ContentObject as U, ComponentsObject as V, DiscriminatorObject as W, HeaderObject as X, ExternalDocumentationObject as Y, HeadersObject as Z, ZodOpenApiLinksObject as _, ResponsesObject as _t, ZodObjectInput as a, OAuthFlowsObject as at, ZodOpenApiOperationObject as b, SchemaObjectValue as bt, ZodOpenApiComponentsObject as c, ParameterLocation as ct, ZodOpenApiEncodingPropertyObject as d, PathItemObject as dt, LinkObject as et, ZodOpenApiExampleObject as f, PathObject as ft, ZodOpenApiLinkObject as g, ResponseObject as gt, ZodOpenApiHeadersObject as h, RequestBodyObject as ht, CreateDocumentOptions as i, OAuthFlowObject as it, createDocument as j, ServerVariableObject as jt, ZodOpenApiSecuritySchemeObject as k, XmlObject as kt, ZodOpenApiContentObject as l, ParameterObject as lt, ZodOpenApiHeaderObject as m, ReferenceObject as mt, createComponents as n, LinksObject as nt, ZodOpenApiCallbackObject as o, OpenAPIObject as ot, ZodOpenApiExamplesObject as p, PathsObject as pt, ExampleObject as q, createRegistry as r, MediaTypeObject as rt, ZodOpenApiCallbacksObject as s, OperationObject as st, ComponentRegistry as t, LinkParametersObject as tt, ZodOpenApiEncodingObject as u, ParameterStyle as ut, ZodOpenApiMediaTypeObject as v, SchemaObject as vt, ZodOpenApiPathsObject as w, SecuritySchemeObject as wt, ZodOpenApiParameterObject as x, SchemasObject as xt, ZodOpenApiObject as y, SchemaObjectType as yt, CallbackObject as z };
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
+
import * as core from "zod/v4/core";
|
|
1
2
|
import { $ZodType, $ZodTypes, JSONSchemaMeta, toJSONSchema } from "zod/v4/core";
|
|
2
3
|
|
|
3
4
|
//#region src/openapi.d.ts
|
|
4
|
-
declare const openApiVersions: readonly ["3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.1.0", "3.1.1"];
|
|
5
|
+
declare const openApiVersions: readonly ["3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.1.0", "3.1.1", "3.2.0"];
|
|
5
6
|
type OpenApiVersion = (typeof openApiVersions)[number];
|
|
6
7
|
//#endregion
|
|
7
|
-
//#region
|
|
8
|
+
//#region src/zod.d.ts
|
|
9
|
+
declare const isAnyZodType: (schema: unknown) => schema is core.$ZodTypes;
|
|
10
|
+
type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
|
|
11
|
+
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region packages/openapi3-ts/src/dist/model/specification-extension.d.ts
|
|
8
14
|
type IExtensionName = `x-${string}`;
|
|
9
15
|
type IExtensionType = any;
|
|
10
16
|
type ISpecificationExtension = {
|
|
11
17
|
[extensionName: IExtensionName]: IExtensionType;
|
|
12
18
|
};
|
|
13
19
|
//#endregion
|
|
14
|
-
//#region packages/openapi3-ts/
|
|
15
|
-
interface ServerObject extends ISpecificationExtension {
|
|
20
|
+
//#region packages/openapi3-ts/src/dist/model/oas-common.d.ts
|
|
21
|
+
interface ServerObject$1 extends ISpecificationExtension {
|
|
16
22
|
url: string;
|
|
17
23
|
description?: string;
|
|
18
24
|
variables?: {
|
|
@@ -25,10 +31,20 @@ interface ServerVariableObject extends ISpecificationExtension {
|
|
|
25
31
|
description?: string;
|
|
26
32
|
}
|
|
27
33
|
//#endregion
|
|
28
|
-
//#region packages/openapi3-ts/
|
|
34
|
+
//#region packages/openapi3-ts/src/dist/model/openapi32.d.ts
|
|
35
|
+
interface ServerObject extends ISpecificationExtension {
|
|
36
|
+
url: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
variables?: {
|
|
40
|
+
[v: string]: ServerVariableObject;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
29
43
|
interface OpenAPIObject extends ISpecificationExtension {
|
|
30
44
|
openapi: string;
|
|
45
|
+
$self?: string;
|
|
31
46
|
info: InfoObject;
|
|
47
|
+
jsonSchemaDialect?: string;
|
|
32
48
|
servers?: ServerObject[];
|
|
33
49
|
paths?: PathsObject;
|
|
34
50
|
components?: ComponentsObject;
|
|
@@ -39,6 +55,7 @@ interface OpenAPIObject extends ISpecificationExtension {
|
|
|
39
55
|
}
|
|
40
56
|
interface InfoObject extends ISpecificationExtension {
|
|
41
57
|
title: string;
|
|
58
|
+
summary?: string;
|
|
42
59
|
description?: string;
|
|
43
60
|
termsOfService?: string;
|
|
44
61
|
contact?: ContactObject;
|
|
@@ -86,6 +103,9 @@ interface ComponentsObject extends ISpecificationExtension {
|
|
|
86
103
|
pathItems?: {
|
|
87
104
|
[pathItem: string]: PathItemObject | ReferenceObject;
|
|
88
105
|
};
|
|
106
|
+
mediaTypes?: {
|
|
107
|
+
[mediaType: string]: MediaTypeObject | ReferenceObject;
|
|
108
|
+
};
|
|
89
109
|
}
|
|
90
110
|
interface PathsObject extends ISpecificationExtension {
|
|
91
111
|
[path: string]: PathItemObject;
|
|
@@ -103,6 +123,10 @@ interface PathItemObject extends ISpecificationExtension {
|
|
|
103
123
|
head?: OperationObject;
|
|
104
124
|
patch?: OperationObject;
|
|
105
125
|
trace?: OperationObject;
|
|
126
|
+
query?: OperationObject;
|
|
127
|
+
additionalOperations?: {
|
|
128
|
+
[method: string]: OperationObject;
|
|
129
|
+
};
|
|
106
130
|
servers?: ServerObject[];
|
|
107
131
|
parameters?: (ParameterObject | ReferenceObject)[];
|
|
108
132
|
}
|
|
@@ -124,8 +148,8 @@ interface ExternalDocumentationObject extends ISpecificationExtension {
|
|
|
124
148
|
description?: string;
|
|
125
149
|
url: string;
|
|
126
150
|
}
|
|
127
|
-
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
128
|
-
type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
151
|
+
type ParameterLocation = 'query' | 'querystring' | 'header' | 'path' | 'cookie';
|
|
152
|
+
type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject' | 'cookie';
|
|
129
153
|
interface BaseParameterObject extends ISpecificationExtension {
|
|
130
154
|
description?: string;
|
|
131
155
|
required?: boolean;
|
|
@@ -151,13 +175,16 @@ interface RequestBodyObject extends ISpecificationExtension {
|
|
|
151
175
|
required?: boolean;
|
|
152
176
|
}
|
|
153
177
|
interface ContentObject {
|
|
154
|
-
[mediatype: string]: MediaTypeObject;
|
|
178
|
+
[mediatype: string]: MediaTypeObject | ReferenceObject;
|
|
155
179
|
}
|
|
156
180
|
interface MediaTypeObject extends ISpecificationExtension {
|
|
157
181
|
schema?: SchemaObject | ReferenceObject;
|
|
182
|
+
itemSchema?: SchemaObject | ReferenceObject;
|
|
158
183
|
examples?: ExamplesObject;
|
|
159
184
|
example?: any;
|
|
160
185
|
encoding?: EncodingObject;
|
|
186
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
187
|
+
itemEncoding?: EncodingPropertyObject;
|
|
161
188
|
}
|
|
162
189
|
interface EncodingObject extends ISpecificationExtension {
|
|
163
190
|
[property: string]: EncodingPropertyObject | any;
|
|
@@ -170,6 +197,9 @@ interface EncodingPropertyObject {
|
|
|
170
197
|
style?: string;
|
|
171
198
|
explode?: boolean;
|
|
172
199
|
allowReserved?: boolean;
|
|
200
|
+
encoding?: EncodingObject;
|
|
201
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
202
|
+
itemEncoding?: EncodingPropertyObject;
|
|
173
203
|
[key: string]: any;
|
|
174
204
|
}
|
|
175
205
|
interface ResponsesObject extends ISpecificationExtension {
|
|
@@ -177,7 +207,8 @@ interface ResponsesObject extends ISpecificationExtension {
|
|
|
177
207
|
[statuscode: string]: ResponseObject | ReferenceObject | any;
|
|
178
208
|
}
|
|
179
209
|
interface ResponseObject extends ISpecificationExtension {
|
|
180
|
-
|
|
210
|
+
summary?: string;
|
|
211
|
+
description?: string;
|
|
181
212
|
headers?: HeadersObject;
|
|
182
213
|
content?: ContentObject;
|
|
183
214
|
links?: LinksObject;
|
|
@@ -194,6 +225,8 @@ interface HeadersObject {
|
|
|
194
225
|
interface ExampleObject {
|
|
195
226
|
summary?: string;
|
|
196
227
|
description?: string;
|
|
228
|
+
dataValue?: any;
|
|
229
|
+
serializedValue?: string;
|
|
197
230
|
value?: any;
|
|
198
231
|
externalValue?: string;
|
|
199
232
|
[property: string]: any;
|
|
@@ -218,8 +251,11 @@ interface HeaderObject extends BaseParameterObject {
|
|
|
218
251
|
}
|
|
219
252
|
interface TagObject extends ISpecificationExtension {
|
|
220
253
|
name: string;
|
|
254
|
+
summary?: string;
|
|
221
255
|
description?: string;
|
|
222
256
|
externalDocs?: ExternalDocumentationObject;
|
|
257
|
+
parent?: string;
|
|
258
|
+
kind?: string;
|
|
223
259
|
[extension: string]: any;
|
|
224
260
|
}
|
|
225
261
|
interface ExamplesObject {
|
|
@@ -231,8 +267,18 @@ interface ReferenceObject {
|
|
|
231
267
|
description?: string;
|
|
232
268
|
}
|
|
233
269
|
type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
|
|
234
|
-
|
|
270
|
+
type SchemaObject = SchemaObjectValue | boolean;
|
|
271
|
+
interface SchemaObjectValue extends ISpecificationExtension {
|
|
272
|
+
[keyword: string]: any;
|
|
235
273
|
$ref?: string;
|
|
274
|
+
$schema?: string;
|
|
275
|
+
$id?: string;
|
|
276
|
+
$anchor?: string;
|
|
277
|
+
$dynamicRef?: string;
|
|
278
|
+
$dynamicAnchor?: string;
|
|
279
|
+
$defs?: {
|
|
280
|
+
[schema: string]: SchemaObject | ReferenceObject;
|
|
281
|
+
};
|
|
236
282
|
discriminator?: DiscriminatorObject;
|
|
237
283
|
readOnly?: boolean;
|
|
238
284
|
writeOnly?: boolean;
|
|
@@ -248,11 +294,26 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
248
294
|
anyOf?: (SchemaObject | ReferenceObject)[];
|
|
249
295
|
not?: SchemaObject | ReferenceObject;
|
|
250
296
|
items?: SchemaObject | ReferenceObject;
|
|
297
|
+
contains?: SchemaObject | ReferenceObject;
|
|
251
298
|
properties?: {
|
|
252
299
|
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
253
300
|
};
|
|
254
301
|
additionalProperties?: SchemaObject | ReferenceObject | boolean;
|
|
255
302
|
propertyNames?: SchemaObject | ReferenceObject;
|
|
303
|
+
patternProperties?: {
|
|
304
|
+
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
305
|
+
};
|
|
306
|
+
dependentSchemas?: {
|
|
307
|
+
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
308
|
+
};
|
|
309
|
+
dependentRequired?: {
|
|
310
|
+
[propertyName: string]: string[];
|
|
311
|
+
};
|
|
312
|
+
if?: SchemaObject | ReferenceObject;
|
|
313
|
+
then?: SchemaObject | ReferenceObject;
|
|
314
|
+
else?: SchemaObject | ReferenceObject;
|
|
315
|
+
unevaluatedItems?: SchemaObject | ReferenceObject | boolean;
|
|
316
|
+
unevaluatedProperties?: SchemaObject | ReferenceObject | boolean;
|
|
256
317
|
description?: string;
|
|
257
318
|
default?: any;
|
|
258
319
|
title?: string;
|
|
@@ -273,6 +334,7 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
273
334
|
required?: string[];
|
|
274
335
|
enum?: any[];
|
|
275
336
|
prefixItems?: (SchemaObject | ReferenceObject)[];
|
|
337
|
+
contentSchema?: SchemaObject | ReferenceObject;
|
|
276
338
|
contentMediaType?: string;
|
|
277
339
|
contentEncoding?: string;
|
|
278
340
|
}
|
|
@@ -284,15 +346,18 @@ interface DiscriminatorObject {
|
|
|
284
346
|
mapping?: {
|
|
285
347
|
[key: string]: string;
|
|
286
348
|
};
|
|
349
|
+
defaultMapping?: string;
|
|
287
350
|
}
|
|
351
|
+
type XmlNodeType = 'element' | 'attribute' | 'text' | 'cdata' | 'none';
|
|
288
352
|
interface XmlObject extends ISpecificationExtension {
|
|
353
|
+
nodeType?: XmlNodeType;
|
|
289
354
|
name?: string;
|
|
290
355
|
namespace?: string;
|
|
291
356
|
prefix?: string;
|
|
292
357
|
attribute?: boolean;
|
|
293
358
|
wrapped?: boolean;
|
|
294
359
|
}
|
|
295
|
-
type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
360
|
+
type SecuritySchemeType = 'apiKey' | 'http' | 'mutualTLS' | 'oauth2' | 'openIdConnect';
|
|
296
361
|
interface SecuritySchemeObject extends ISpecificationExtension {
|
|
297
362
|
type: SecuritySchemeType;
|
|
298
363
|
description?: string;
|
|
@@ -302,15 +367,19 @@ interface SecuritySchemeObject extends ISpecificationExtension {
|
|
|
302
367
|
bearerFormat?: string;
|
|
303
368
|
flows?: OAuthFlowsObject;
|
|
304
369
|
openIdConnectUrl?: string;
|
|
370
|
+
oauth2MetadataUrl?: string;
|
|
371
|
+
deprecated?: boolean;
|
|
305
372
|
}
|
|
306
373
|
interface OAuthFlowsObject extends ISpecificationExtension {
|
|
307
374
|
implicit?: OAuthFlowObject;
|
|
308
375
|
password?: OAuthFlowObject;
|
|
309
376
|
clientCredentials?: OAuthFlowObject;
|
|
310
377
|
authorizationCode?: OAuthFlowObject;
|
|
378
|
+
deviceAuthorization?: OAuthFlowObject;
|
|
311
379
|
}
|
|
312
380
|
interface OAuthFlowObject extends ISpecificationExtension {
|
|
313
381
|
authorizationUrl?: string;
|
|
382
|
+
deviceAuthorizationUrl?: string;
|
|
314
383
|
tokenUrl?: string;
|
|
315
384
|
refreshUrl?: string;
|
|
316
385
|
scopes: ScopesObject;
|
|
@@ -323,8 +392,6 @@ interface SecurityRequirementObject {
|
|
|
323
392
|
}
|
|
324
393
|
//#endregion
|
|
325
394
|
//#region src/types.d.ts
|
|
326
|
-
type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
|
|
327
|
-
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
|
|
328
395
|
type ZodOpenApiOverrideContext = OverrideParameters & {
|
|
329
396
|
io: 'input' | 'output';
|
|
330
397
|
};
|
|
@@ -379,8 +446,21 @@ declare module 'zod/v4' {
|
|
|
379
446
|
}
|
|
380
447
|
//#endregion
|
|
381
448
|
//#region src/create/document.d.ts
|
|
382
|
-
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema'> {
|
|
449
|
+
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema' | 'itemSchema' | 'encoding' | 'prefixEncoding' | 'itemEncoding'> {
|
|
383
450
|
schema?: $ZodType | SchemaObject | ReferenceObject;
|
|
451
|
+
itemSchema?: $ZodType | SchemaObject | ReferenceObject;
|
|
452
|
+
encoding?: ZodOpenApiEncodingObject;
|
|
453
|
+
prefixEncoding?: ZodOpenApiEncodingPropertyObject[];
|
|
454
|
+
itemEncoding?: ZodOpenApiEncodingPropertyObject;
|
|
455
|
+
}
|
|
456
|
+
interface ZodOpenApiEncodingObject extends ISpecificationExtension {
|
|
457
|
+
[property: string]: ZodOpenApiEncodingPropertyObject;
|
|
458
|
+
}
|
|
459
|
+
interface ZodOpenApiEncodingPropertyObject extends Omit<EncodingPropertyObject, 'headers' | 'encoding' | 'prefixEncoding' | 'itemEncoding'> {
|
|
460
|
+
headers?: ZodOpenApiHeadersObject;
|
|
461
|
+
encoding?: ZodOpenApiEncodingObject;
|
|
462
|
+
prefixEncoding?: ZodOpenApiEncodingPropertyObject[];
|
|
463
|
+
itemEncoding?: ZodOpenApiEncodingPropertyObject;
|
|
384
464
|
}
|
|
385
465
|
interface ZodOpenApiContentObject {
|
|
386
466
|
'application/json'?: ZodOpenApiMediaTypeObject;
|
|
@@ -419,7 +499,7 @@ interface ZodOpenApiOperationObject extends Omit<OperationObject, 'requestBody'
|
|
|
419
499
|
responses: ZodOpenApiResponsesObject;
|
|
420
500
|
callbacks?: ZodOpenApiCallbacksObject;
|
|
421
501
|
}
|
|
422
|
-
interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'> {
|
|
502
|
+
interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace' | 'query' | 'additionalOperations' | 'parameters'> {
|
|
423
503
|
get?: ZodOpenApiOperationObject;
|
|
424
504
|
put?: ZodOpenApiOperationObject;
|
|
425
505
|
post?: ZodOpenApiOperationObject;
|
|
@@ -428,6 +508,9 @@ interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' |
|
|
|
428
508
|
head?: ZodOpenApiOperationObject;
|
|
429
509
|
patch?: ZodOpenApiOperationObject;
|
|
430
510
|
trace?: ZodOpenApiOperationObject;
|
|
511
|
+
query?: ZodOpenApiOperationObject;
|
|
512
|
+
additionalOperations?: Record<string, ZodOpenApiOperationObject>;
|
|
513
|
+
parameters?: Array<$ZodType | ParameterObject | ReferenceObject>;
|
|
431
514
|
/**
|
|
432
515
|
* Used to register this path item as a component.
|
|
433
516
|
*/
|
|
@@ -632,4 +715,4 @@ interface ComponentRegistry {
|
|
|
632
715
|
declare const createRegistry: (components?: ZodOpenApiComponentsObject) => ComponentRegistry;
|
|
633
716
|
declare const createComponents: (registry: ComponentRegistry, opts: CreateDocumentOptions, openapiVersion?: OpenApiVersion) => ComponentsObject;
|
|
634
717
|
//#endregion
|
|
635
|
-
export {
|
|
718
|
+
export { LicenseObject as $, ZodOpenApiVersion as A, ServerObject$1 as At, CallbacksObject as B, ZodOpenApiPathItemObject as C, SecurityRequirementObject as Ct, ZodOpenApiResponsesObject as D, TagObject as Dt, ZodOpenApiResponseObject as E, ServerObject as Et, ZodOpenApiOverrideContext as F, isAnyZodType as Ft, EncodingObject as G, ContactObject as H, ZodOpenApiOverrideMeta as I, OpenApiVersion as It, ExamplesObject as J, EncodingPropertyObject as K, ZodOpenApiOverrideMetaContext as L, ZodOpenApiBaseMetadata as M, IExtensionName as Mt, ZodOpenApiMetadata as N, IExtensionType as Nt, ZodOpenApiSchemaObject as O, XmlNodeType as Ot, ZodOpenApiOverride as P, ISpecificationExtension as Pt, InfoObject as Q, BaseParameterObject as R, ZodOpenApiParameters as S, ScopesObject as St, ZodOpenApiRequestBodyObject as T, SecuritySchemeType as Tt, ContentObject as U, ComponentsObject as V, DiscriminatorObject as W, HeaderObject as X, ExternalDocumentationObject as Y, HeadersObject as Z, ZodOpenApiLinksObject as _, ResponsesObject as _t, ZodObjectInput as a, OAuthFlowsObject as at, ZodOpenApiOperationObject as b, SchemaObjectValue as bt, ZodOpenApiComponentsObject as c, ParameterLocation as ct, ZodOpenApiEncodingPropertyObject as d, PathItemObject as dt, LinkObject as et, ZodOpenApiExampleObject as f, PathObject as ft, ZodOpenApiLinkObject as g, ResponseObject as gt, ZodOpenApiHeadersObject as h, RequestBodyObject as ht, CreateDocumentOptions as i, OAuthFlowObject as it, createDocument as j, ServerVariableObject as jt, ZodOpenApiSecuritySchemeObject as k, XmlObject as kt, ZodOpenApiContentObject as l, ParameterObject as lt, ZodOpenApiHeaderObject as m, ReferenceObject as mt, createComponents as n, LinksObject as nt, ZodOpenApiCallbackObject as o, OpenAPIObject as ot, ZodOpenApiExamplesObject as p, PathsObject as pt, ExampleObject as q, createRegistry as r, MediaTypeObject as rt, ZodOpenApiCallbacksObject as s, OperationObject as st, ComponentRegistry as t, LinkParametersObject as tt, ZodOpenApiEncodingObject as u, ParameterStyle as ut, ZodOpenApiMediaTypeObject as v, SchemaObject as vt, ZodOpenApiPathsObject as w, SecuritySchemeObject as wt, ZodOpenApiParameterObject as x, SchemasObject as xt, ZodOpenApiObject as y, SchemaObjectType as yt, CallbackObject as z };
|