zod-openapi 5.4.6 → 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-ZWafjNVh.cjs → lib/components-BDEwP6Uu.cjs} +230 -208
- package/{dist/components-Bl1eJexW.d.mts → lib/components-DfsFcO5r.d.cts} +93 -14
- package/{dist/components-CpNqFsIP.d.cts → lib/components-DfsFcO5r.d.mts} +93 -14
- package/{dist/components-DiNDbisK.mjs → lib/components-DgApn4JL.mjs} +200 -178
- 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 -7
- package/dist/api.d.mts +0 -7
- package/dist/index.d.cts +0 -32
- package/dist/index.d.mts +0 -32
|
@@ -2,7 +2,7 @@ import * as core from "zod/v4/core";
|
|
|
2
2
|
import { $ZodType, $ZodTypes, JSONSchemaMeta, toJSONSchema } from "zod/v4/core";
|
|
3
3
|
|
|
4
4
|
//#region src/openapi.d.ts
|
|
5
|
-
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"];
|
|
6
6
|
type OpenApiVersion = (typeof openApiVersions)[number];
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/zod.d.ts
|
|
@@ -10,15 +10,15 @@ declare const isAnyZodType: (schema: unknown) => schema is core.$ZodTypes;
|
|
|
10
10
|
type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
|
|
11
11
|
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region packages/openapi3-ts/
|
|
13
|
+
//#region packages/openapi3-ts/src/dist/model/specification-extension.d.ts
|
|
14
14
|
type IExtensionName = `x-${string}`;
|
|
15
15
|
type IExtensionType = any;
|
|
16
16
|
type ISpecificationExtension = {
|
|
17
17
|
[extensionName: IExtensionName]: IExtensionType;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region packages/openapi3-ts/
|
|
21
|
-
interface ServerObject extends ISpecificationExtension {
|
|
20
|
+
//#region packages/openapi3-ts/src/dist/model/oas-common.d.ts
|
|
21
|
+
interface ServerObject$1 extends ISpecificationExtension {
|
|
22
22
|
url: string;
|
|
23
23
|
description?: string;
|
|
24
24
|
variables?: {
|
|
@@ -31,10 +31,20 @@ interface ServerVariableObject extends ISpecificationExtension {
|
|
|
31
31
|
description?: string;
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
//#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
|
+
}
|
|
35
43
|
interface OpenAPIObject extends ISpecificationExtension {
|
|
36
44
|
openapi: string;
|
|
45
|
+
$self?: string;
|
|
37
46
|
info: InfoObject;
|
|
47
|
+
jsonSchemaDialect?: string;
|
|
38
48
|
servers?: ServerObject[];
|
|
39
49
|
paths?: PathsObject;
|
|
40
50
|
components?: ComponentsObject;
|
|
@@ -45,6 +55,7 @@ interface OpenAPIObject extends ISpecificationExtension {
|
|
|
45
55
|
}
|
|
46
56
|
interface InfoObject extends ISpecificationExtension {
|
|
47
57
|
title: string;
|
|
58
|
+
summary?: string;
|
|
48
59
|
description?: string;
|
|
49
60
|
termsOfService?: string;
|
|
50
61
|
contact?: ContactObject;
|
|
@@ -92,6 +103,9 @@ interface ComponentsObject extends ISpecificationExtension {
|
|
|
92
103
|
pathItems?: {
|
|
93
104
|
[pathItem: string]: PathItemObject | ReferenceObject;
|
|
94
105
|
};
|
|
106
|
+
mediaTypes?: {
|
|
107
|
+
[mediaType: string]: MediaTypeObject | ReferenceObject;
|
|
108
|
+
};
|
|
95
109
|
}
|
|
96
110
|
interface PathsObject extends ISpecificationExtension {
|
|
97
111
|
[path: string]: PathItemObject;
|
|
@@ -109,6 +123,10 @@ interface PathItemObject extends ISpecificationExtension {
|
|
|
109
123
|
head?: OperationObject;
|
|
110
124
|
patch?: OperationObject;
|
|
111
125
|
trace?: OperationObject;
|
|
126
|
+
query?: OperationObject;
|
|
127
|
+
additionalOperations?: {
|
|
128
|
+
[method: string]: OperationObject;
|
|
129
|
+
};
|
|
112
130
|
servers?: ServerObject[];
|
|
113
131
|
parameters?: (ParameterObject | ReferenceObject)[];
|
|
114
132
|
}
|
|
@@ -130,8 +148,8 @@ interface ExternalDocumentationObject extends ISpecificationExtension {
|
|
|
130
148
|
description?: string;
|
|
131
149
|
url: string;
|
|
132
150
|
}
|
|
133
|
-
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
134
|
-
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';
|
|
135
153
|
interface BaseParameterObject extends ISpecificationExtension {
|
|
136
154
|
description?: string;
|
|
137
155
|
required?: boolean;
|
|
@@ -157,13 +175,16 @@ interface RequestBodyObject extends ISpecificationExtension {
|
|
|
157
175
|
required?: boolean;
|
|
158
176
|
}
|
|
159
177
|
interface ContentObject {
|
|
160
|
-
[mediatype: string]: MediaTypeObject;
|
|
178
|
+
[mediatype: string]: MediaTypeObject | ReferenceObject;
|
|
161
179
|
}
|
|
162
180
|
interface MediaTypeObject extends ISpecificationExtension {
|
|
163
181
|
schema?: SchemaObject | ReferenceObject;
|
|
182
|
+
itemSchema?: SchemaObject | ReferenceObject;
|
|
164
183
|
examples?: ExamplesObject;
|
|
165
184
|
example?: any;
|
|
166
185
|
encoding?: EncodingObject;
|
|
186
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
187
|
+
itemEncoding?: EncodingPropertyObject;
|
|
167
188
|
}
|
|
168
189
|
interface EncodingObject extends ISpecificationExtension {
|
|
169
190
|
[property: string]: EncodingPropertyObject | any;
|
|
@@ -176,6 +197,9 @@ interface EncodingPropertyObject {
|
|
|
176
197
|
style?: string;
|
|
177
198
|
explode?: boolean;
|
|
178
199
|
allowReserved?: boolean;
|
|
200
|
+
encoding?: EncodingObject;
|
|
201
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
202
|
+
itemEncoding?: EncodingPropertyObject;
|
|
179
203
|
[key: string]: any;
|
|
180
204
|
}
|
|
181
205
|
interface ResponsesObject extends ISpecificationExtension {
|
|
@@ -183,7 +207,8 @@ interface ResponsesObject extends ISpecificationExtension {
|
|
|
183
207
|
[statuscode: string]: ResponseObject | ReferenceObject | any;
|
|
184
208
|
}
|
|
185
209
|
interface ResponseObject extends ISpecificationExtension {
|
|
186
|
-
|
|
210
|
+
summary?: string;
|
|
211
|
+
description?: string;
|
|
187
212
|
headers?: HeadersObject;
|
|
188
213
|
content?: ContentObject;
|
|
189
214
|
links?: LinksObject;
|
|
@@ -200,6 +225,8 @@ interface HeadersObject {
|
|
|
200
225
|
interface ExampleObject {
|
|
201
226
|
summary?: string;
|
|
202
227
|
description?: string;
|
|
228
|
+
dataValue?: any;
|
|
229
|
+
serializedValue?: string;
|
|
203
230
|
value?: any;
|
|
204
231
|
externalValue?: string;
|
|
205
232
|
[property: string]: any;
|
|
@@ -224,8 +251,11 @@ interface HeaderObject extends BaseParameterObject {
|
|
|
224
251
|
}
|
|
225
252
|
interface TagObject extends ISpecificationExtension {
|
|
226
253
|
name: string;
|
|
254
|
+
summary?: string;
|
|
227
255
|
description?: string;
|
|
228
256
|
externalDocs?: ExternalDocumentationObject;
|
|
257
|
+
parent?: string;
|
|
258
|
+
kind?: string;
|
|
229
259
|
[extension: string]: any;
|
|
230
260
|
}
|
|
231
261
|
interface ExamplesObject {
|
|
@@ -237,8 +267,18 @@ interface ReferenceObject {
|
|
|
237
267
|
description?: string;
|
|
238
268
|
}
|
|
239
269
|
type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
|
|
240
|
-
|
|
270
|
+
type SchemaObject = SchemaObjectValue | boolean;
|
|
271
|
+
interface SchemaObjectValue extends ISpecificationExtension {
|
|
272
|
+
[keyword: string]: any;
|
|
241
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
|
+
};
|
|
242
282
|
discriminator?: DiscriminatorObject;
|
|
243
283
|
readOnly?: boolean;
|
|
244
284
|
writeOnly?: boolean;
|
|
@@ -254,11 +294,26 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
254
294
|
anyOf?: (SchemaObject | ReferenceObject)[];
|
|
255
295
|
not?: SchemaObject | ReferenceObject;
|
|
256
296
|
items?: SchemaObject | ReferenceObject;
|
|
297
|
+
contains?: SchemaObject | ReferenceObject;
|
|
257
298
|
properties?: {
|
|
258
299
|
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
259
300
|
};
|
|
260
301
|
additionalProperties?: SchemaObject | ReferenceObject | boolean;
|
|
261
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;
|
|
262
317
|
description?: string;
|
|
263
318
|
default?: any;
|
|
264
319
|
title?: string;
|
|
@@ -279,6 +334,7 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
279
334
|
required?: string[];
|
|
280
335
|
enum?: any[];
|
|
281
336
|
prefixItems?: (SchemaObject | ReferenceObject)[];
|
|
337
|
+
contentSchema?: SchemaObject | ReferenceObject;
|
|
282
338
|
contentMediaType?: string;
|
|
283
339
|
contentEncoding?: string;
|
|
284
340
|
}
|
|
@@ -290,15 +346,18 @@ interface DiscriminatorObject {
|
|
|
290
346
|
mapping?: {
|
|
291
347
|
[key: string]: string;
|
|
292
348
|
};
|
|
349
|
+
defaultMapping?: string;
|
|
293
350
|
}
|
|
351
|
+
type XmlNodeType = 'element' | 'attribute' | 'text' | 'cdata' | 'none';
|
|
294
352
|
interface XmlObject extends ISpecificationExtension {
|
|
353
|
+
nodeType?: XmlNodeType;
|
|
295
354
|
name?: string;
|
|
296
355
|
namespace?: string;
|
|
297
356
|
prefix?: string;
|
|
298
357
|
attribute?: boolean;
|
|
299
358
|
wrapped?: boolean;
|
|
300
359
|
}
|
|
301
|
-
type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
360
|
+
type SecuritySchemeType = 'apiKey' | 'http' | 'mutualTLS' | 'oauth2' | 'openIdConnect';
|
|
302
361
|
interface SecuritySchemeObject extends ISpecificationExtension {
|
|
303
362
|
type: SecuritySchemeType;
|
|
304
363
|
description?: string;
|
|
@@ -308,15 +367,19 @@ interface SecuritySchemeObject extends ISpecificationExtension {
|
|
|
308
367
|
bearerFormat?: string;
|
|
309
368
|
flows?: OAuthFlowsObject;
|
|
310
369
|
openIdConnectUrl?: string;
|
|
370
|
+
oauth2MetadataUrl?: string;
|
|
371
|
+
deprecated?: boolean;
|
|
311
372
|
}
|
|
312
373
|
interface OAuthFlowsObject extends ISpecificationExtension {
|
|
313
374
|
implicit?: OAuthFlowObject;
|
|
314
375
|
password?: OAuthFlowObject;
|
|
315
376
|
clientCredentials?: OAuthFlowObject;
|
|
316
377
|
authorizationCode?: OAuthFlowObject;
|
|
378
|
+
deviceAuthorization?: OAuthFlowObject;
|
|
317
379
|
}
|
|
318
380
|
interface OAuthFlowObject extends ISpecificationExtension {
|
|
319
381
|
authorizationUrl?: string;
|
|
382
|
+
deviceAuthorizationUrl?: string;
|
|
320
383
|
tokenUrl?: string;
|
|
321
384
|
refreshUrl?: string;
|
|
322
385
|
scopes: ScopesObject;
|
|
@@ -383,8 +446,21 @@ declare module 'zod/v4' {
|
|
|
383
446
|
}
|
|
384
447
|
//#endregion
|
|
385
448
|
//#region src/create/document.d.ts
|
|
386
|
-
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema'> {
|
|
449
|
+
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema' | 'itemSchema' | 'encoding' | 'prefixEncoding' | 'itemEncoding'> {
|
|
387
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;
|
|
388
464
|
}
|
|
389
465
|
interface ZodOpenApiContentObject {
|
|
390
466
|
'application/json'?: ZodOpenApiMediaTypeObject;
|
|
@@ -423,7 +499,7 @@ interface ZodOpenApiOperationObject extends Omit<OperationObject, 'requestBody'
|
|
|
423
499
|
responses: ZodOpenApiResponsesObject;
|
|
424
500
|
callbacks?: ZodOpenApiCallbacksObject;
|
|
425
501
|
}
|
|
426
|
-
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'> {
|
|
427
503
|
get?: ZodOpenApiOperationObject;
|
|
428
504
|
put?: ZodOpenApiOperationObject;
|
|
429
505
|
post?: ZodOpenApiOperationObject;
|
|
@@ -432,6 +508,9 @@ interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' |
|
|
|
432
508
|
head?: ZodOpenApiOperationObject;
|
|
433
509
|
patch?: ZodOpenApiOperationObject;
|
|
434
510
|
trace?: ZodOpenApiOperationObject;
|
|
511
|
+
query?: ZodOpenApiOperationObject;
|
|
512
|
+
additionalOperations?: Record<string, ZodOpenApiOperationObject>;
|
|
513
|
+
parameters?: Array<$ZodType | ParameterObject | ReferenceObject>;
|
|
435
514
|
/**
|
|
436
515
|
* Used to register this path item as a component.
|
|
437
516
|
*/
|
|
@@ -636,4 +715,4 @@ interface ComponentRegistry {
|
|
|
636
715
|
declare const createRegistry: (components?: ZodOpenApiComponentsObject) => ComponentRegistry;
|
|
637
716
|
declare const createComponents: (registry: ComponentRegistry, opts: CreateDocumentOptions, openapiVersion?: OpenApiVersion) => ComponentsObject;
|
|
638
717
|
//#endregion
|
|
639
|
-
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 };
|
|
@@ -2,7 +2,7 @@ import * as core from "zod/v4/core";
|
|
|
2
2
|
import { $ZodType, $ZodTypes, JSONSchemaMeta, toJSONSchema } from "zod/v4/core";
|
|
3
3
|
|
|
4
4
|
//#region src/openapi.d.ts
|
|
5
|
-
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"];
|
|
6
6
|
type OpenApiVersion = (typeof openApiVersions)[number];
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/zod.d.ts
|
|
@@ -10,15 +10,15 @@ declare const isAnyZodType: (schema: unknown) => schema is core.$ZodTypes;
|
|
|
10
10
|
type OverrideParameters = Parameters<NonNullable<NonNullable<Parameters<typeof toJSONSchema>[1]>['override']>>[0];
|
|
11
11
|
type OverrideSchemaParameters = Omit<OverrideParameters, 'zodSchema'>;
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region packages/openapi3-ts/
|
|
13
|
+
//#region packages/openapi3-ts/src/dist/model/specification-extension.d.ts
|
|
14
14
|
type IExtensionName = `x-${string}`;
|
|
15
15
|
type IExtensionType = any;
|
|
16
16
|
type ISpecificationExtension = {
|
|
17
17
|
[extensionName: IExtensionName]: IExtensionType;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
20
|
-
//#region packages/openapi3-ts/
|
|
21
|
-
interface ServerObject extends ISpecificationExtension {
|
|
20
|
+
//#region packages/openapi3-ts/src/dist/model/oas-common.d.ts
|
|
21
|
+
interface ServerObject$1 extends ISpecificationExtension {
|
|
22
22
|
url: string;
|
|
23
23
|
description?: string;
|
|
24
24
|
variables?: {
|
|
@@ -31,10 +31,20 @@ interface ServerVariableObject extends ISpecificationExtension {
|
|
|
31
31
|
description?: string;
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
//#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
|
+
}
|
|
35
43
|
interface OpenAPIObject extends ISpecificationExtension {
|
|
36
44
|
openapi: string;
|
|
45
|
+
$self?: string;
|
|
37
46
|
info: InfoObject;
|
|
47
|
+
jsonSchemaDialect?: string;
|
|
38
48
|
servers?: ServerObject[];
|
|
39
49
|
paths?: PathsObject;
|
|
40
50
|
components?: ComponentsObject;
|
|
@@ -45,6 +55,7 @@ interface OpenAPIObject extends ISpecificationExtension {
|
|
|
45
55
|
}
|
|
46
56
|
interface InfoObject extends ISpecificationExtension {
|
|
47
57
|
title: string;
|
|
58
|
+
summary?: string;
|
|
48
59
|
description?: string;
|
|
49
60
|
termsOfService?: string;
|
|
50
61
|
contact?: ContactObject;
|
|
@@ -92,6 +103,9 @@ interface ComponentsObject extends ISpecificationExtension {
|
|
|
92
103
|
pathItems?: {
|
|
93
104
|
[pathItem: string]: PathItemObject | ReferenceObject;
|
|
94
105
|
};
|
|
106
|
+
mediaTypes?: {
|
|
107
|
+
[mediaType: string]: MediaTypeObject | ReferenceObject;
|
|
108
|
+
};
|
|
95
109
|
}
|
|
96
110
|
interface PathsObject extends ISpecificationExtension {
|
|
97
111
|
[path: string]: PathItemObject;
|
|
@@ -109,6 +123,10 @@ interface PathItemObject extends ISpecificationExtension {
|
|
|
109
123
|
head?: OperationObject;
|
|
110
124
|
patch?: OperationObject;
|
|
111
125
|
trace?: OperationObject;
|
|
126
|
+
query?: OperationObject;
|
|
127
|
+
additionalOperations?: {
|
|
128
|
+
[method: string]: OperationObject;
|
|
129
|
+
};
|
|
112
130
|
servers?: ServerObject[];
|
|
113
131
|
parameters?: (ParameterObject | ReferenceObject)[];
|
|
114
132
|
}
|
|
@@ -130,8 +148,8 @@ interface ExternalDocumentationObject extends ISpecificationExtension {
|
|
|
130
148
|
description?: string;
|
|
131
149
|
url: string;
|
|
132
150
|
}
|
|
133
|
-
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
134
|
-
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';
|
|
135
153
|
interface BaseParameterObject extends ISpecificationExtension {
|
|
136
154
|
description?: string;
|
|
137
155
|
required?: boolean;
|
|
@@ -157,13 +175,16 @@ interface RequestBodyObject extends ISpecificationExtension {
|
|
|
157
175
|
required?: boolean;
|
|
158
176
|
}
|
|
159
177
|
interface ContentObject {
|
|
160
|
-
[mediatype: string]: MediaTypeObject;
|
|
178
|
+
[mediatype: string]: MediaTypeObject | ReferenceObject;
|
|
161
179
|
}
|
|
162
180
|
interface MediaTypeObject extends ISpecificationExtension {
|
|
163
181
|
schema?: SchemaObject | ReferenceObject;
|
|
182
|
+
itemSchema?: SchemaObject | ReferenceObject;
|
|
164
183
|
examples?: ExamplesObject;
|
|
165
184
|
example?: any;
|
|
166
185
|
encoding?: EncodingObject;
|
|
186
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
187
|
+
itemEncoding?: EncodingPropertyObject;
|
|
167
188
|
}
|
|
168
189
|
interface EncodingObject extends ISpecificationExtension {
|
|
169
190
|
[property: string]: EncodingPropertyObject | any;
|
|
@@ -176,6 +197,9 @@ interface EncodingPropertyObject {
|
|
|
176
197
|
style?: string;
|
|
177
198
|
explode?: boolean;
|
|
178
199
|
allowReserved?: boolean;
|
|
200
|
+
encoding?: EncodingObject;
|
|
201
|
+
prefixEncoding?: EncodingPropertyObject[];
|
|
202
|
+
itemEncoding?: EncodingPropertyObject;
|
|
179
203
|
[key: string]: any;
|
|
180
204
|
}
|
|
181
205
|
interface ResponsesObject extends ISpecificationExtension {
|
|
@@ -183,7 +207,8 @@ interface ResponsesObject extends ISpecificationExtension {
|
|
|
183
207
|
[statuscode: string]: ResponseObject | ReferenceObject | any;
|
|
184
208
|
}
|
|
185
209
|
interface ResponseObject extends ISpecificationExtension {
|
|
186
|
-
|
|
210
|
+
summary?: string;
|
|
211
|
+
description?: string;
|
|
187
212
|
headers?: HeadersObject;
|
|
188
213
|
content?: ContentObject;
|
|
189
214
|
links?: LinksObject;
|
|
@@ -200,6 +225,8 @@ interface HeadersObject {
|
|
|
200
225
|
interface ExampleObject {
|
|
201
226
|
summary?: string;
|
|
202
227
|
description?: string;
|
|
228
|
+
dataValue?: any;
|
|
229
|
+
serializedValue?: string;
|
|
203
230
|
value?: any;
|
|
204
231
|
externalValue?: string;
|
|
205
232
|
[property: string]: any;
|
|
@@ -224,8 +251,11 @@ interface HeaderObject extends BaseParameterObject {
|
|
|
224
251
|
}
|
|
225
252
|
interface TagObject extends ISpecificationExtension {
|
|
226
253
|
name: string;
|
|
254
|
+
summary?: string;
|
|
227
255
|
description?: string;
|
|
228
256
|
externalDocs?: ExternalDocumentationObject;
|
|
257
|
+
parent?: string;
|
|
258
|
+
kind?: string;
|
|
229
259
|
[extension: string]: any;
|
|
230
260
|
}
|
|
231
261
|
interface ExamplesObject {
|
|
@@ -237,8 +267,18 @@ interface ReferenceObject {
|
|
|
237
267
|
description?: string;
|
|
238
268
|
}
|
|
239
269
|
type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
|
|
240
|
-
|
|
270
|
+
type SchemaObject = SchemaObjectValue | boolean;
|
|
271
|
+
interface SchemaObjectValue extends ISpecificationExtension {
|
|
272
|
+
[keyword: string]: any;
|
|
241
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
|
+
};
|
|
242
282
|
discriminator?: DiscriminatorObject;
|
|
243
283
|
readOnly?: boolean;
|
|
244
284
|
writeOnly?: boolean;
|
|
@@ -254,11 +294,26 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
254
294
|
anyOf?: (SchemaObject | ReferenceObject)[];
|
|
255
295
|
not?: SchemaObject | ReferenceObject;
|
|
256
296
|
items?: SchemaObject | ReferenceObject;
|
|
297
|
+
contains?: SchemaObject | ReferenceObject;
|
|
257
298
|
properties?: {
|
|
258
299
|
[propertyName: string]: SchemaObject | ReferenceObject;
|
|
259
300
|
};
|
|
260
301
|
additionalProperties?: SchemaObject | ReferenceObject | boolean;
|
|
261
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;
|
|
262
317
|
description?: string;
|
|
263
318
|
default?: any;
|
|
264
319
|
title?: string;
|
|
@@ -279,6 +334,7 @@ interface SchemaObject extends ISpecificationExtension {
|
|
|
279
334
|
required?: string[];
|
|
280
335
|
enum?: any[];
|
|
281
336
|
prefixItems?: (SchemaObject | ReferenceObject)[];
|
|
337
|
+
contentSchema?: SchemaObject | ReferenceObject;
|
|
282
338
|
contentMediaType?: string;
|
|
283
339
|
contentEncoding?: string;
|
|
284
340
|
}
|
|
@@ -290,15 +346,18 @@ interface DiscriminatorObject {
|
|
|
290
346
|
mapping?: {
|
|
291
347
|
[key: string]: string;
|
|
292
348
|
};
|
|
349
|
+
defaultMapping?: string;
|
|
293
350
|
}
|
|
351
|
+
type XmlNodeType = 'element' | 'attribute' | 'text' | 'cdata' | 'none';
|
|
294
352
|
interface XmlObject extends ISpecificationExtension {
|
|
353
|
+
nodeType?: XmlNodeType;
|
|
295
354
|
name?: string;
|
|
296
355
|
namespace?: string;
|
|
297
356
|
prefix?: string;
|
|
298
357
|
attribute?: boolean;
|
|
299
358
|
wrapped?: boolean;
|
|
300
359
|
}
|
|
301
|
-
type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
360
|
+
type SecuritySchemeType = 'apiKey' | 'http' | 'mutualTLS' | 'oauth2' | 'openIdConnect';
|
|
302
361
|
interface SecuritySchemeObject extends ISpecificationExtension {
|
|
303
362
|
type: SecuritySchemeType;
|
|
304
363
|
description?: string;
|
|
@@ -308,15 +367,19 @@ interface SecuritySchemeObject extends ISpecificationExtension {
|
|
|
308
367
|
bearerFormat?: string;
|
|
309
368
|
flows?: OAuthFlowsObject;
|
|
310
369
|
openIdConnectUrl?: string;
|
|
370
|
+
oauth2MetadataUrl?: string;
|
|
371
|
+
deprecated?: boolean;
|
|
311
372
|
}
|
|
312
373
|
interface OAuthFlowsObject extends ISpecificationExtension {
|
|
313
374
|
implicit?: OAuthFlowObject;
|
|
314
375
|
password?: OAuthFlowObject;
|
|
315
376
|
clientCredentials?: OAuthFlowObject;
|
|
316
377
|
authorizationCode?: OAuthFlowObject;
|
|
378
|
+
deviceAuthorization?: OAuthFlowObject;
|
|
317
379
|
}
|
|
318
380
|
interface OAuthFlowObject extends ISpecificationExtension {
|
|
319
381
|
authorizationUrl?: string;
|
|
382
|
+
deviceAuthorizationUrl?: string;
|
|
320
383
|
tokenUrl?: string;
|
|
321
384
|
refreshUrl?: string;
|
|
322
385
|
scopes: ScopesObject;
|
|
@@ -383,8 +446,21 @@ declare module 'zod/v4' {
|
|
|
383
446
|
}
|
|
384
447
|
//#endregion
|
|
385
448
|
//#region src/create/document.d.ts
|
|
386
|
-
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema'> {
|
|
449
|
+
interface ZodOpenApiMediaTypeObject extends Omit<MediaTypeObject, 'schema' | 'itemSchema' | 'encoding' | 'prefixEncoding' | 'itemEncoding'> {
|
|
387
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;
|
|
388
464
|
}
|
|
389
465
|
interface ZodOpenApiContentObject {
|
|
390
466
|
'application/json'?: ZodOpenApiMediaTypeObject;
|
|
@@ -423,7 +499,7 @@ interface ZodOpenApiOperationObject extends Omit<OperationObject, 'requestBody'
|
|
|
423
499
|
responses: ZodOpenApiResponsesObject;
|
|
424
500
|
callbacks?: ZodOpenApiCallbacksObject;
|
|
425
501
|
}
|
|
426
|
-
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'> {
|
|
427
503
|
get?: ZodOpenApiOperationObject;
|
|
428
504
|
put?: ZodOpenApiOperationObject;
|
|
429
505
|
post?: ZodOpenApiOperationObject;
|
|
@@ -432,6 +508,9 @@ interface ZodOpenApiPathItemObject extends Omit<PathItemObject, 'get' | 'put' |
|
|
|
432
508
|
head?: ZodOpenApiOperationObject;
|
|
433
509
|
patch?: ZodOpenApiOperationObject;
|
|
434
510
|
trace?: ZodOpenApiOperationObject;
|
|
511
|
+
query?: ZodOpenApiOperationObject;
|
|
512
|
+
additionalOperations?: Record<string, ZodOpenApiOperationObject>;
|
|
513
|
+
parameters?: Array<$ZodType | ParameterObject | ReferenceObject>;
|
|
435
514
|
/**
|
|
436
515
|
* Used to register this path item as a component.
|
|
437
516
|
*/
|
|
@@ -636,4 +715,4 @@ interface ComponentRegistry {
|
|
|
636
715
|
declare const createRegistry: (components?: ZodOpenApiComponentsObject) => ComponentRegistry;
|
|
637
716
|
declare const createComponents: (registry: ComponentRegistry, opts: CreateDocumentOptions, openapiVersion?: OpenApiVersion) => ComponentsObject;
|
|
638
717
|
//#endregion
|
|
639
|
-
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 };
|