zod-openapi 5.0.0-beta.8 → 5.0.0-beta.9
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 +2 -2
- package/dist/api.d.mts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +2 -3
- package/dist/api.mjs +1 -2
- package/dist/{components-DMRr6ft0.mjs → components-0QHfGwg0.mjs} +157 -107
- package/dist/{components-BBthgA_z.d.ts → components-26wns3Hd.d.mts} +8 -13
- package/dist/{components-BaA49bb2.js → components-CB3cj8u3.js} +192 -113
- package/dist/{components-DzDcF4aG.d.mts → components-CokUEQbL.d.ts} +8 -13
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/package.json +2 -5
- package/dist/create/componentsSideEffects.d.mts +0 -6
- package/dist/create/componentsSideEffects.d.ts +0 -6
- package/dist/create/componentsSideEffects.js +0 -48
- package/dist/create/componentsSideEffects.mjs +0 -48
- package/dist/zod-BvA30wad.mjs +0 -5
- package/dist/zod-i2t01GF0.js +0 -40
|
@@ -1,8 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
const zod_v4_core = __toESM(require("zod/v4/core"));
|
|
25
|
+
const zod_v4 = __toESM(require("zod/v4"));
|
|
26
|
+
|
|
27
|
+
//#region src/zod.ts
|
|
28
|
+
const isAnyZodType = (schema) => typeof schema === "object" && schema !== null && "_zod" in schema;
|
|
5
29
|
|
|
30
|
+
//#endregion
|
|
6
31
|
//#region src/create/object.ts
|
|
7
32
|
const unwrapZodObject = (zodType, io, path) => {
|
|
8
33
|
const def = zodType._zod.def;
|
|
@@ -58,7 +83,7 @@ const createManualParameters = (parameters, ctx, path) => {
|
|
|
58
83
|
if (!parameters) return void 0;
|
|
59
84
|
const parameterObjects = [];
|
|
60
85
|
for (const parameter of parameters) {
|
|
61
|
-
if (
|
|
86
|
+
if (isAnyZodType(parameter)) {
|
|
62
87
|
const seenParameter = ctx.registry.parameters.seen.get(parameter);
|
|
63
88
|
if (seenParameter) {
|
|
64
89
|
parameterObjects.push(seenParameter);
|
|
@@ -102,7 +127,7 @@ const createParameters = (requestParams, ctx, path) => {
|
|
|
102
127
|
//#region src/create/content.ts
|
|
103
128
|
const createMediaTypeObject = (mediaTypeObject, ctx, path) => {
|
|
104
129
|
const computedPath = path.join(" > ");
|
|
105
|
-
if (
|
|
130
|
+
if (isAnyZodType(mediaTypeObject.schema)) {
|
|
106
131
|
const schemaObject = ctx.registry.schemas.setSchema(computedPath, mediaTypeObject.schema, ctx.io);
|
|
107
132
|
return {
|
|
108
133
|
...mediaTypeObject,
|
|
@@ -161,7 +186,7 @@ const createHeader = (header, ctx, path) => {
|
|
|
161
186
|
};
|
|
162
187
|
const createHeaders = (headers, ctx, path) => {
|
|
163
188
|
if (!headers) return void 0;
|
|
164
|
-
if (
|
|
189
|
+
if (isAnyZodType(headers)) {
|
|
165
190
|
const zodObject = unwrapZodObject(headers, ctx.io, path);
|
|
166
191
|
const headersObject = {};
|
|
167
192
|
for (const [key, zodSchema] of Object.entries(zodObject._zod.def.shape)) {
|
|
@@ -217,43 +242,43 @@ const createResponses = (responses, ctx, path) => {
|
|
|
217
242
|
|
|
218
243
|
//#endregion
|
|
219
244
|
//#region src/create/paths.ts
|
|
220
|
-
const createOperation = (operationObject, registry, path) => {
|
|
245
|
+
const createOperation = (operationObject, registry$1, path) => {
|
|
221
246
|
const { parameters, requestParams, requestBody, responses, callbacks,...rest } = operationObject;
|
|
222
247
|
const operation = rest;
|
|
223
248
|
const maybeManualParameters = createManualParameters(parameters, {
|
|
224
|
-
registry,
|
|
249
|
+
registry: registry$1,
|
|
225
250
|
io: "input"
|
|
226
251
|
}, [...path, "parameters"]);
|
|
227
252
|
const maybeRequestParams = createParameters(requestParams, {
|
|
228
|
-
registry,
|
|
253
|
+
registry: registry$1,
|
|
229
254
|
io: "input"
|
|
230
255
|
}, [...path, "requestParams"]);
|
|
231
256
|
if (maybeRequestParams || maybeManualParameters) operation.parameters = [...maybeRequestParams ?? [], ...maybeManualParameters ?? []];
|
|
232
257
|
const maybeRequestBody = createRequestBody(requestBody, {
|
|
233
|
-
registry,
|
|
258
|
+
registry: registry$1,
|
|
234
259
|
io: "input"
|
|
235
260
|
}, [...path, "requestBody"]);
|
|
236
261
|
if (maybeRequestBody) operation.requestBody = maybeRequestBody;
|
|
237
262
|
const maybeResponses = createResponses(responses, {
|
|
238
|
-
registry,
|
|
263
|
+
registry: registry$1,
|
|
239
264
|
io: "output"
|
|
240
265
|
}, [...path, "responses"]);
|
|
241
266
|
if (maybeResponses) operation.responses = maybeResponses;
|
|
242
|
-
const maybeCallbacks = createCallbacks(callbacks, registry, [...path, "callbacks"]);
|
|
267
|
+
const maybeCallbacks = createCallbacks(callbacks, registry$1, [...path, "callbacks"]);
|
|
243
268
|
if (maybeCallbacks) operation.callbacks = maybeCallbacks;
|
|
244
269
|
return operation;
|
|
245
270
|
};
|
|
246
|
-
const createPathItem = (pathItem, registry, path) => {
|
|
271
|
+
const createPathItem = (pathItem, registry$1, path) => {
|
|
247
272
|
const pathItemObject = {};
|
|
248
273
|
const { id,...rest } = pathItem;
|
|
249
274
|
for (const [key, value] of Object.entries(rest)) {
|
|
250
275
|
if (key === "get" || key === "put" || key === "post" || key === "delete" || key === "options" || key === "head" || key === "patch" || key === "trace") {
|
|
251
|
-
pathItemObject[key] = createOperation(value, registry, [...path, key]);
|
|
276
|
+
pathItemObject[key] = createOperation(value, registry$1, [...path, key]);
|
|
252
277
|
continue;
|
|
253
278
|
}
|
|
254
279
|
if (key === "parameters") {
|
|
255
280
|
pathItemObject[key] = createManualParameters(value, {
|
|
256
|
-
registry,
|
|
281
|
+
registry: registry$1,
|
|
257
282
|
io: "input"
|
|
258
283
|
}, [...path, key]);
|
|
259
284
|
continue;
|
|
@@ -262,14 +287,14 @@ const createPathItem = (pathItem, registry, path) => {
|
|
|
262
287
|
}
|
|
263
288
|
if (id) {
|
|
264
289
|
const ref = { $ref: `#/components/pathItems/${id}` };
|
|
265
|
-
registry.pathItems.ids.set(id, pathItemObject);
|
|
266
|
-
registry.pathItems.seen.set(pathItem, ref);
|
|
290
|
+
registry$1.pathItems.ids.set(id, pathItemObject);
|
|
291
|
+
registry$1.pathItems.seen.set(pathItem, ref);
|
|
267
292
|
return ref;
|
|
268
293
|
}
|
|
269
|
-
registry.pathItems.seen.set(pathItem, pathItemObject);
|
|
294
|
+
registry$1.pathItems.seen.set(pathItem, pathItemObject);
|
|
270
295
|
return pathItemObject;
|
|
271
296
|
};
|
|
272
|
-
const createPaths = (paths, registry, path) => {
|
|
297
|
+
const createPaths = (paths, registry$1, path) => {
|
|
273
298
|
if (!paths) return void 0;
|
|
274
299
|
const pathsObject = {};
|
|
275
300
|
for (const [singlePath, pathItemObject] of Object.entries(paths)) {
|
|
@@ -277,15 +302,15 @@ const createPaths = (paths, registry, path) => {
|
|
|
277
302
|
pathsObject[singlePath] = pathItemObject;
|
|
278
303
|
continue;
|
|
279
304
|
}
|
|
280
|
-
pathsObject[singlePath] = createPathItem(pathItemObject, registry, [...path, singlePath]);
|
|
305
|
+
pathsObject[singlePath] = createPathItem(pathItemObject, registry$1, [...path, singlePath]);
|
|
281
306
|
}
|
|
282
307
|
return pathsObject;
|
|
283
308
|
};
|
|
284
309
|
|
|
285
310
|
//#endregion
|
|
286
311
|
//#region src/create/callbacks.ts
|
|
287
|
-
const createCallback = (callbackObject, registry, path) => {
|
|
288
|
-
const seenCallback = registry.callbacks.seen.get(callbackObject);
|
|
312
|
+
const createCallback = (callbackObject, registry$1, path) => {
|
|
313
|
+
const seenCallback = registry$1.callbacks.seen.get(callbackObject);
|
|
289
314
|
if (seenCallback) return seenCallback;
|
|
290
315
|
const { id,...rest } = callbackObject;
|
|
291
316
|
const callback = {};
|
|
@@ -294,18 +319,18 @@ const createCallback = (callbackObject, registry, path) => {
|
|
|
294
319
|
callback[name] = pathItem;
|
|
295
320
|
continue;
|
|
296
321
|
}
|
|
297
|
-
callback[name] = createPathItem(pathItem, registry, [...path, name]);
|
|
322
|
+
callback[name] = createPathItem(pathItem, registry$1, [...path, name]);
|
|
298
323
|
}
|
|
299
324
|
if (id) {
|
|
300
325
|
const ref = { $ref: `#/components/callbacks/${id}` };
|
|
301
|
-
registry.callbacks.ids.set(id, callback);
|
|
302
|
-
registry.callbacks.seen.set(callbackObject, ref);
|
|
326
|
+
registry$1.callbacks.ids.set(id, callback);
|
|
327
|
+
registry$1.callbacks.seen.set(callbackObject, ref);
|
|
303
328
|
return ref;
|
|
304
329
|
}
|
|
305
|
-
registry.callbacks.seen.set(callbackObject, callback);
|
|
330
|
+
registry$1.callbacks.seen.set(callbackObject, callback);
|
|
306
331
|
return callback;
|
|
307
332
|
};
|
|
308
|
-
const createCallbacks = (callbacks, registry, path) => {
|
|
333
|
+
const createCallbacks = (callbacks, registry$1, path) => {
|
|
309
334
|
if (!callbacks) return void 0;
|
|
310
335
|
const callbacksObject = {};
|
|
311
336
|
for (const [name, value] of Object.entries(callbacks)) {
|
|
@@ -313,7 +338,7 @@ const createCallbacks = (callbacks, registry, path) => {
|
|
|
313
338
|
callbacksObject[name] = value;
|
|
314
339
|
continue;
|
|
315
340
|
}
|
|
316
|
-
callbacksObject[name] = createCallback(value, registry, [...path, name]);
|
|
341
|
+
callbacksObject[name] = createCallback(value, registry$1, [...path, name]);
|
|
317
342
|
}
|
|
318
343
|
return callbacksObject;
|
|
319
344
|
};
|
|
@@ -395,6 +420,7 @@ const validate = (ctx, opts) => {
|
|
|
395
420
|
//#region src/create/schema/rename.ts
|
|
396
421
|
const renameComponents = (components, outputIds, ctx) => {
|
|
397
422
|
const componentsToRename = /* @__PURE__ */ new Map();
|
|
423
|
+
if (ctx.io === "input") return componentsToRename;
|
|
398
424
|
const componentDependencies = /* @__PURE__ */ new Map();
|
|
399
425
|
const stringifiedComponents = /* @__PURE__ */ new Map();
|
|
400
426
|
for (const [key, value] of Object.entries(components)) {
|
|
@@ -420,18 +446,18 @@ const renameComponents = (components, outputIds, ctx) => {
|
|
|
420
446
|
}
|
|
421
447
|
return componentsToRename;
|
|
422
448
|
};
|
|
423
|
-
const isDependencyPure = (componentDependencies, stringifiedComponents, registry, key, visited = /* @__PURE__ */ new Set()) => {
|
|
449
|
+
const isDependencyPure = (componentDependencies, stringifiedComponents, registry$1, key, visited = /* @__PURE__ */ new Set()) => {
|
|
424
450
|
if (visited.has(key)) return true;
|
|
425
451
|
const dependencies = componentDependencies.get(key);
|
|
426
452
|
if (dependencies.pure !== void 0) return dependencies.pure;
|
|
427
453
|
const stringified = stringifiedComponents.get(key);
|
|
428
|
-
const component = registry.schemas.ids.get(key);
|
|
454
|
+
const component = registry$1.schemas.ids.get(key);
|
|
429
455
|
if (component && stringified !== JSON.stringify(component)) {
|
|
430
456
|
dependencies.pure = false;
|
|
431
457
|
return false;
|
|
432
458
|
}
|
|
433
459
|
visited.add(key);
|
|
434
|
-
const result = [...dependencies.dependencies].every((dep) => isDependencyPure(componentDependencies, stringifiedComponents, registry, dep, new Set(visited)));
|
|
460
|
+
const result = [...dependencies.dependencies].every((dep) => isDependencyPure(componentDependencies, stringifiedComponents, registry$1, dep, new Set(visited)));
|
|
435
461
|
dependencies.pure = result;
|
|
436
462
|
return result;
|
|
437
463
|
};
|
|
@@ -469,9 +495,11 @@ const createSchema = (schema, ctx = {
|
|
|
469
495
|
const createSchemas = (schemas, ctx) => {
|
|
470
496
|
const entries = {};
|
|
471
497
|
for (const [name, { zodType }] of Object.entries(schemas)) entries[name] = zodType;
|
|
472
|
-
const
|
|
498
|
+
const zodRegistry = (0, zod_v4.registry)();
|
|
499
|
+
zodRegistry.add((0, zod_v4.object)(entries), { id: "zodOpenApiCreateSchema" });
|
|
500
|
+
for (const [id, { zodType }] of ctx.registry.schemas.manual) zodRegistry.add(zodType, { id });
|
|
473
501
|
const outputIds = /* @__PURE__ */ new Map();
|
|
474
|
-
const jsonSchema = (0, zod_v4.toJSONSchema)(
|
|
502
|
+
const jsonSchema = (0, zod_v4.toJSONSchema)(zodRegistry, {
|
|
475
503
|
override(context) {
|
|
476
504
|
const meta = context.zodSchema.meta();
|
|
477
505
|
if (meta?.outputId && meta?.id) outputIds.set(meta.id, meta.outputId);
|
|
@@ -498,11 +526,13 @@ const createSchemas = (schemas, ctx) => {
|
|
|
498
526
|
io: ctx.io,
|
|
499
527
|
unrepresentable: "any",
|
|
500
528
|
reused: ctx.opts.reused,
|
|
501
|
-
cycles: ctx.opts.cycles
|
|
529
|
+
cycles: ctx.opts.cycles,
|
|
530
|
+
uri: (id) => id === "__shared" ? `#ZOD_OPENAPI/${id}` : `#ZOD_OPENAPI/__shared#/$defs/${id}`
|
|
502
531
|
});
|
|
503
|
-
const components = jsonSchema
|
|
532
|
+
const components = jsonSchema.schemas.__shared?.$defs ?? {};
|
|
533
|
+
jsonSchema.schemas.__shared ??= { $defs: components };
|
|
504
534
|
const dynamicComponents = /* @__PURE__ */ new Map();
|
|
505
|
-
for (const [key, value] of Object.entries(components)) if (/^
|
|
535
|
+
for (const [key, value] of Object.entries(components)) if (/^schema\d+$/.test(key)) {
|
|
506
536
|
const newName = `__schema${ctx.registry.schemas.dynamicSchemaCount++}`;
|
|
507
537
|
dynamicComponents.set(key, `"#/components/schemas/${newName}"`);
|
|
508
538
|
if (newName !== key) {
|
|
@@ -510,38 +540,59 @@ const createSchemas = (schemas, ctx) => {
|
|
|
510
540
|
delete components[key];
|
|
511
541
|
}
|
|
512
542
|
}
|
|
513
|
-
const
|
|
543
|
+
const manualUsed = {};
|
|
544
|
+
const parsedJsonSchema = JSON.parse(JSON.stringify(jsonSchema).replace(/"#ZOD_OPENAPI\/__shared#\/\$defs\/([^"]+)"/g, (_, match) => {
|
|
514
545
|
const dynamic = dynamicComponents.get(match);
|
|
515
546
|
if (dynamic) return dynamic;
|
|
516
547
|
const manualComponent = ctx.registry.schemas.manual.get(match);
|
|
517
|
-
if (manualComponent)
|
|
548
|
+
if (manualComponent) manualUsed[match] = true;
|
|
518
549
|
return `"#/components/schemas/${match}"`;
|
|
519
550
|
}));
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
551
|
+
const parsedComponents = parsedJsonSchema.schemas.__shared?.$defs ?? {};
|
|
552
|
+
parsedJsonSchema.schemas.__shared ??= { $defs: parsedComponents };
|
|
553
|
+
for (const [key] of ctx.registry.schemas.manual) {
|
|
554
|
+
const manualComponent = parsedJsonSchema.schemas[key];
|
|
555
|
+
if (!manualComponent) continue;
|
|
556
|
+
delete manualComponent.$schema;
|
|
557
|
+
delete manualComponent.id;
|
|
558
|
+
if (manualUsed[key]) {
|
|
559
|
+
delete manualComponent.$schema;
|
|
560
|
+
delete manualComponent.id;
|
|
561
|
+
if (parsedComponents[key]) throw new Error(`Component "${key}" is already registered as a component in the registry`);
|
|
562
|
+
parsedComponents[key] = manualComponent;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
const componentsToRename = renameComponents(parsedComponents, outputIds, ctx);
|
|
566
|
+
if (!componentsToRename.size) {
|
|
567
|
+
const parsedSchemas = parsedJsonSchema.schemas.zodOpenApiCreateSchema?.properties;
|
|
568
|
+
delete parsedJsonSchema.schemas.zodOpenApiCreateSchema;
|
|
569
|
+
delete parsedJsonSchema.schemas.__shared;
|
|
570
|
+
return {
|
|
571
|
+
schemas: parsedSchemas,
|
|
572
|
+
components: parsedComponents,
|
|
573
|
+
manual: parsedJsonSchema.schemas
|
|
574
|
+
};
|
|
524
575
|
}
|
|
525
|
-
const renamedComponents = renameComponents(parsedJsonSchema.$defs ?? {}, outputIds, ctx);
|
|
526
|
-
if (!renamedComponents.size) return {
|
|
527
|
-
schemas: parsedJsonSchema.properties,
|
|
528
|
-
components: parsedJsonSchema.$defs ?? {}
|
|
529
|
-
};
|
|
530
576
|
const renamedJsonSchema = JSON.parse(JSON.stringify(parsedJsonSchema).replace(/"#\/components\/schemas\/([^"]+)"/g, (_, match) => {
|
|
531
|
-
const replacement =
|
|
577
|
+
const replacement = componentsToRename.get(match);
|
|
532
578
|
if (replacement) return `"#/components/schemas/${replacement}"`;
|
|
533
579
|
return `"#/components/schemas/${match}"`;
|
|
534
580
|
}));
|
|
581
|
+
const renamedSchemas = renamedJsonSchema.schemas.zodOpenApiCreateSchema?.properties;
|
|
582
|
+
const renamedComponents = renamedJsonSchema.schemas.__shared?.$defs ?? {};
|
|
583
|
+
delete renamedJsonSchema.schemas.zodOpenApiCreateSchema;
|
|
584
|
+
delete renamedJsonSchema.schemas.__shared;
|
|
535
585
|
return {
|
|
536
|
-
schemas:
|
|
537
|
-
components:
|
|
586
|
+
schemas: renamedSchemas,
|
|
587
|
+
components: renamedComponents,
|
|
588
|
+
manual: renamedJsonSchema.schemas
|
|
538
589
|
};
|
|
539
590
|
};
|
|
540
591
|
|
|
541
592
|
//#endregion
|
|
542
593
|
//#region src/create/components.ts
|
|
543
594
|
const createRegistry = (components) => {
|
|
544
|
-
const registry = {
|
|
595
|
+
const registry$1 = {
|
|
545
596
|
schemas: {
|
|
546
597
|
dynamicSchemaCount: 0,
|
|
547
598
|
input: /* @__PURE__ */ new Map(),
|
|
@@ -550,7 +601,7 @@ const createRegistry = (components) => {
|
|
|
550
601
|
manual: /* @__PURE__ */ new Map(),
|
|
551
602
|
setSchema: (key, schema, io) => {
|
|
552
603
|
const schemaObject = {};
|
|
553
|
-
registry.schemas[io].set(key, {
|
|
604
|
+
registry$1.schemas[io].set(key, {
|
|
554
605
|
schemaObject,
|
|
555
606
|
zodType: schema
|
|
556
607
|
});
|
|
@@ -582,58 +633,74 @@ const createRegistry = (components) => {
|
|
|
582
633
|
seen: /* @__PURE__ */ new WeakMap()
|
|
583
634
|
}
|
|
584
635
|
};
|
|
585
|
-
|
|
586
|
-
registerParameters(components?.parameters, registry);
|
|
587
|
-
registerHeaders(components?.headers, registry);
|
|
588
|
-
registerResponses(components?.responses, registry);
|
|
589
|
-
registerPathItems(components?.pathItems, registry);
|
|
590
|
-
registerRequestBodies(components?.requestBodies, registry);
|
|
591
|
-
registerCallbacks(components?.callbacks, registry);
|
|
592
|
-
return registry;
|
|
593
|
-
};
|
|
594
|
-
const
|
|
636
|
+
registerSchemas(components?.schemas, registry$1);
|
|
637
|
+
registerParameters(components?.parameters, registry$1);
|
|
638
|
+
registerHeaders(components?.headers, registry$1);
|
|
639
|
+
registerResponses(components?.responses, registry$1);
|
|
640
|
+
registerPathItems(components?.pathItems, registry$1);
|
|
641
|
+
registerRequestBodies(components?.requestBodies, registry$1);
|
|
642
|
+
registerCallbacks(components?.callbacks, registry$1);
|
|
643
|
+
return registry$1;
|
|
644
|
+
};
|
|
645
|
+
const registerSchemas = (schemas, registry$1) => {
|
|
646
|
+
if (!schemas) return;
|
|
647
|
+
for (const [key, schema] of Object.entries(schemas)) {
|
|
648
|
+
if (registry$1.schemas.ids.has(key)) throw new Error(`Schema "${key}" is already registered`);
|
|
649
|
+
if (isAnyZodType(schema)) {
|
|
650
|
+
const id = zod_v4_core.globalRegistry.get(schema)?.id ?? key;
|
|
651
|
+
registry$1.schemas.manual.set(id, {
|
|
652
|
+
input: { schemaObject: {} },
|
|
653
|
+
output: { schemaObject: {} },
|
|
654
|
+
zodType: schema
|
|
655
|
+
});
|
|
656
|
+
continue;
|
|
657
|
+
}
|
|
658
|
+
registry$1.schemas.ids.set(key, schema);
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
const registerParameters = (parameters, registry$1) => {
|
|
595
662
|
if (!parameters) return;
|
|
596
663
|
for (const [key, schema] of Object.entries(parameters)) {
|
|
597
|
-
if (registry.parameters.ids.has(key)) throw new Error(`Parameter "${key}" is already registered`);
|
|
598
|
-
if (
|
|
664
|
+
if (registry$1.parameters.ids.has(key)) throw new Error(`Parameter "${key}" is already registered`);
|
|
665
|
+
if (isAnyZodType(schema)) {
|
|
599
666
|
const path = [
|
|
600
667
|
"components",
|
|
601
668
|
"parameters",
|
|
602
669
|
key
|
|
603
670
|
];
|
|
604
671
|
const paramObject = createParameter(schema, void 0, {
|
|
605
|
-
registry,
|
|
672
|
+
registry: registry$1,
|
|
606
673
|
io: "input"
|
|
607
674
|
}, path);
|
|
608
|
-
registry.parameters.ids.set(key, paramObject);
|
|
609
|
-
registry.parameters.seen.set(schema, paramObject);
|
|
675
|
+
registry$1.parameters.ids.set(key, paramObject);
|
|
676
|
+
registry$1.parameters.seen.set(schema, paramObject);
|
|
610
677
|
continue;
|
|
611
678
|
}
|
|
612
|
-
registry.parameters.ids.set(key, schema);
|
|
679
|
+
registry$1.parameters.ids.set(key, schema);
|
|
613
680
|
}
|
|
614
681
|
};
|
|
615
|
-
const registerHeaders = (headers, registry) => {
|
|
682
|
+
const registerHeaders = (headers, registry$1) => {
|
|
616
683
|
if (!headers) return;
|
|
617
684
|
for (const [key, schema] of Object.entries(headers)) {
|
|
618
|
-
if (registry.headers.ids.has(key)) throw new Error(`Header "${key}" is already registered`);
|
|
619
|
-
if (
|
|
685
|
+
if (registry$1.headers.ids.has(key)) throw new Error(`Header "${key}" is already registered`);
|
|
686
|
+
if (isAnyZodType(schema)) {
|
|
620
687
|
const path = [
|
|
621
688
|
"components",
|
|
622
689
|
"headers",
|
|
623
690
|
key
|
|
624
691
|
];
|
|
625
692
|
const headerObject = createHeader(schema, {
|
|
626
|
-
registry,
|
|
693
|
+
registry: registry$1,
|
|
627
694
|
io: "output"
|
|
628
695
|
}, path);
|
|
629
|
-
registry.headers.ids.set(key, headerObject);
|
|
630
|
-
registry.headers.seen.set(schema, headerObject);
|
|
696
|
+
registry$1.headers.ids.set(key, headerObject);
|
|
697
|
+
registry$1.headers.seen.set(schema, headerObject);
|
|
631
698
|
continue;
|
|
632
699
|
}
|
|
633
|
-
registry.headers.ids.set(key, schema);
|
|
700
|
+
registry$1.headers.ids.set(key, schema);
|
|
634
701
|
}
|
|
635
702
|
};
|
|
636
|
-
const registerResponses = (responses, registry) => {
|
|
703
|
+
const registerResponses = (responses, registry$1) => {
|
|
637
704
|
if (!responses) return;
|
|
638
705
|
for (const [key, schema] of Object.entries(responses)) {
|
|
639
706
|
const path = [
|
|
@@ -641,99 +708,105 @@ const registerResponses = (responses, registry) => {
|
|
|
641
708
|
"responses",
|
|
642
709
|
key
|
|
643
710
|
];
|
|
644
|
-
if (registry.responses.ids.has(key)) throw new Error(`Response "${key}" is already registered`);
|
|
711
|
+
if (registry$1.responses.ids.has(key)) throw new Error(`Response "${key}" is already registered`);
|
|
645
712
|
const responseObject = createResponse(schema, {
|
|
646
|
-
registry,
|
|
713
|
+
registry: registry$1,
|
|
647
714
|
io: "output"
|
|
648
715
|
}, path);
|
|
649
|
-
registry.responses.ids.set(key, responseObject);
|
|
650
|
-
registry.responses.seen.set(schema, responseObject);
|
|
716
|
+
registry$1.responses.ids.set(key, responseObject);
|
|
717
|
+
registry$1.responses.seen.set(schema, responseObject);
|
|
651
718
|
}
|
|
652
719
|
};
|
|
653
|
-
const registerRequestBodies = (requestBodies, registry) => {
|
|
720
|
+
const registerRequestBodies = (requestBodies, registry$1) => {
|
|
654
721
|
if (!requestBodies) return;
|
|
655
722
|
for (const [key, schema] of Object.entries(requestBodies)) {
|
|
656
|
-
if (registry.requestBodies.ids.has(key)) throw new Error(`RequestBody "${key}" is already registered`);
|
|
657
|
-
if (
|
|
723
|
+
if (registry$1.requestBodies.ids.has(key)) throw new Error(`RequestBody "${key}" is already registered`);
|
|
724
|
+
if (isAnyZodType(schema)) {
|
|
658
725
|
const path = [
|
|
659
726
|
"components",
|
|
660
727
|
"requestBodies",
|
|
661
728
|
key
|
|
662
729
|
];
|
|
663
730
|
const requestBodyObject = createRequestBody(schema, {
|
|
664
|
-
registry,
|
|
731
|
+
registry: registry$1,
|
|
665
732
|
io: "input"
|
|
666
733
|
}, path);
|
|
667
|
-
registry.requestBodies.ids.set(key, requestBodyObject);
|
|
734
|
+
registry$1.requestBodies.ids.set(key, requestBodyObject);
|
|
668
735
|
continue;
|
|
669
736
|
}
|
|
670
|
-
registry.requestBodies.ids.set(key, schema);
|
|
737
|
+
registry$1.requestBodies.ids.set(key, schema);
|
|
671
738
|
}
|
|
672
739
|
};
|
|
673
|
-
const registerCallbacks = (callbacks, registry) => {
|
|
740
|
+
const registerCallbacks = (callbacks, registry$1) => {
|
|
674
741
|
if (!callbacks) return;
|
|
675
742
|
for (const [key, schema] of Object.entries(callbacks)) {
|
|
676
|
-
if (registry.callbacks.ids.has(key)) throw new Error(`Callback "${key}" is already registered`);
|
|
743
|
+
if (registry$1.callbacks.ids.has(key)) throw new Error(`Callback "${key}" is already registered`);
|
|
677
744
|
const path = [
|
|
678
745
|
"components",
|
|
679
746
|
"callbacks",
|
|
680
747
|
key
|
|
681
748
|
];
|
|
682
|
-
const callbackObject = createCallback(schema, registry, path);
|
|
683
|
-
registry.callbacks.ids.set(key, callbackObject);
|
|
684
|
-
registry.callbacks.seen.set(schema, callbackObject);
|
|
749
|
+
const callbackObject = createCallback(schema, registry$1, path);
|
|
750
|
+
registry$1.callbacks.ids.set(key, callbackObject);
|
|
751
|
+
registry$1.callbacks.seen.set(schema, callbackObject);
|
|
685
752
|
}
|
|
686
753
|
};
|
|
687
|
-
const registerPathItems = (pathItems, registry) => {
|
|
754
|
+
const registerPathItems = (pathItems, registry$1) => {
|
|
688
755
|
if (!pathItems) return;
|
|
689
756
|
for (const [key, schema] of Object.entries(pathItems)) {
|
|
690
|
-
if (registry.pathItems.ids.has(key)) throw new Error(`PathItem "${key}" is already registered`);
|
|
757
|
+
if (registry$1.pathItems.ids.has(key)) throw new Error(`PathItem "${key}" is already registered`);
|
|
691
758
|
const path = [
|
|
692
759
|
"components",
|
|
693
760
|
"pathItems",
|
|
694
761
|
key
|
|
695
762
|
];
|
|
696
|
-
const pathItemObject = createPathItem(schema, registry, path);
|
|
697
|
-
registry.pathItems.ids.set(key, pathItemObject);
|
|
698
|
-
registry.pathItems.seen.set(schema, pathItemObject);
|
|
763
|
+
const pathItemObject = createPathItem(schema, registry$1, path);
|
|
764
|
+
registry$1.pathItems.ids.set(key, pathItemObject);
|
|
765
|
+
registry$1.pathItems.seen.set(schema, pathItemObject);
|
|
699
766
|
continue;
|
|
700
767
|
}
|
|
701
768
|
};
|
|
702
769
|
const createIOSchemas = (ctx) => {
|
|
703
|
-
const { schemas, components } = createSchemas(Object.fromEntries(ctx.registry.schemas[ctx.io]), ctx);
|
|
770
|
+
const { schemas, components, manual } = createSchemas(Object.fromEntries(ctx.registry.schemas[ctx.io]), ctx);
|
|
704
771
|
for (const [key, schema] of Object.entries(components)) ctx.registry.schemas.ids.set(key, schema);
|
|
705
772
|
for (const [key, schema] of Object.entries(schemas)) {
|
|
706
773
|
const ioSchema = ctx.registry.schemas[ctx.io].get(key);
|
|
707
774
|
if (ioSchema) Object.assign(ioSchema.schemaObject, schema);
|
|
708
775
|
}
|
|
776
|
+
for (const [key, value] of Object.entries(manual)) {
|
|
777
|
+
const manualSchema = ctx.registry.schemas.manual.get(key);
|
|
778
|
+
if (!manualSchema) continue;
|
|
779
|
+
if (components[key]) manualSchema[ctx.io].used = true;
|
|
780
|
+
Object.assign(manualSchema[ctx.io].schemaObject, value);
|
|
781
|
+
}
|
|
709
782
|
};
|
|
710
|
-
const createManualSchemas = (registry) => {
|
|
711
|
-
for (const [key, value] of registry.schemas.manual) if (value.
|
|
783
|
+
const createManualSchemas = (registry$1) => {
|
|
784
|
+
for (const [key, value] of registry$1.schemas.manual) if (!value.input.used) {
|
|
712
785
|
const io = zod_v4_core.globalRegistry.get(value.zodType)?.unusedIO ?? "output";
|
|
713
|
-
const schema = value
|
|
714
|
-
registry.schemas.ids.set(key, schema);
|
|
786
|
+
const schema = value[io].schemaObject;
|
|
787
|
+
registry$1.schemas.ids.set(key, schema);
|
|
715
788
|
}
|
|
716
789
|
};
|
|
717
|
-
const createComponents = (registry, opts) => {
|
|
790
|
+
const createComponents = (registry$1, opts) => {
|
|
718
791
|
createIOSchemas({
|
|
719
|
-
registry,
|
|
792
|
+
registry: registry$1,
|
|
720
793
|
io: "input",
|
|
721
794
|
opts
|
|
722
795
|
});
|
|
723
796
|
createIOSchemas({
|
|
724
|
-
registry,
|
|
797
|
+
registry: registry$1,
|
|
725
798
|
io: "output",
|
|
726
799
|
opts
|
|
727
800
|
});
|
|
728
|
-
createManualSchemas(registry);
|
|
801
|
+
createManualSchemas(registry$1);
|
|
729
802
|
const components = {};
|
|
730
|
-
if (registry.schemas.ids.size > 0) components.schemas = Object.fromEntries(registry.schemas.ids);
|
|
731
|
-
if (registry.headers.ids.size > 0) components.headers = Object.fromEntries(registry.headers.ids);
|
|
732
|
-
if (registry.requestBodies.ids.size > 0) components.requestBodies = Object.fromEntries(registry.requestBodies.ids);
|
|
733
|
-
if (registry.responses.ids.size > 0) components.responses = Object.fromEntries(registry.responses.ids);
|
|
734
|
-
if (registry.parameters.ids.size > 0) components.parameters = Object.fromEntries(registry.parameters.ids);
|
|
735
|
-
if (registry.callbacks.ids.size > 0) components.callbacks = Object.fromEntries(registry.callbacks.ids);
|
|
736
|
-
if (registry.pathItems.ids.size > 0) components.pathItems = Object.fromEntries(registry.pathItems.ids);
|
|
803
|
+
if (registry$1.schemas.ids.size > 0) components.schemas = Object.fromEntries(registry$1.schemas.ids);
|
|
804
|
+
if (registry$1.headers.ids.size > 0) components.headers = Object.fromEntries(registry$1.headers.ids);
|
|
805
|
+
if (registry$1.requestBodies.ids.size > 0) components.requestBodies = Object.fromEntries(registry$1.requestBodies.ids);
|
|
806
|
+
if (registry$1.responses.ids.size > 0) components.responses = Object.fromEntries(registry$1.responses.ids);
|
|
807
|
+
if (registry$1.parameters.ids.size > 0) components.parameters = Object.fromEntries(registry$1.parameters.ids);
|
|
808
|
+
if (registry$1.callbacks.ids.size > 0) components.callbacks = Object.fromEntries(registry$1.callbacks.ids);
|
|
809
|
+
if (registry$1.pathItems.ids.size > 0) components.pathItems = Object.fromEntries(registry$1.pathItems.ids);
|
|
737
810
|
return components;
|
|
738
811
|
};
|
|
739
812
|
|
|
@@ -768,6 +841,12 @@ Object.defineProperty(exports, 'createSchema', {
|
|
|
768
841
|
return createSchema;
|
|
769
842
|
}
|
|
770
843
|
});
|
|
844
|
+
Object.defineProperty(exports, 'isAnyZodType', {
|
|
845
|
+
enumerable: true,
|
|
846
|
+
get: function () {
|
|
847
|
+
return isAnyZodType;
|
|
848
|
+
}
|
|
849
|
+
});
|
|
771
850
|
Object.defineProperty(exports, 'unwrapZodObject', {
|
|
772
851
|
enumerable: true,
|
|
773
852
|
get: function () {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { $ZodType, $ZodTypes } from "zod/v4/core";
|
|
2
2
|
import { core } from "zod/v4";
|
|
3
|
-
import { ZodType, ZodTypeDef } from "zod";
|
|
4
3
|
|
|
5
4
|
//#region src/openapi3-ts/dist/model/specification-extension.d.ts
|
|
6
5
|
type IExtensionName = `x-${string}`;
|
|
@@ -445,7 +444,6 @@ interface ZodOpenApiObject extends Omit<OpenAPIObject, 'openapi' | 'paths' | 'we
|
|
|
445
444
|
webhooks?: ZodOpenApiPathsObject;
|
|
446
445
|
components?: ZodOpenApiComponentsObject;
|
|
447
446
|
}
|
|
448
|
-
type ZodObjectInputType<Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = Record<string, unknown>> = ZodType<Output, Def, Input>;
|
|
449
447
|
type ZodObjectInput = $ZodType<unknown, Record<string, unknown>>;
|
|
450
448
|
type OverrideType = $ZodTypes['_zod']['def']['type'];
|
|
451
449
|
interface CreateDocumentOptions {
|
|
@@ -496,16 +494,13 @@ interface ComponentRegistry {
|
|
|
496
494
|
}>;
|
|
497
495
|
ids: Map<string, SchemaObject | ReferenceObject>;
|
|
498
496
|
manual: Map<string, {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
used: number;
|
|
507
|
-
schemaObject: SchemaObject;
|
|
508
|
-
};
|
|
497
|
+
input: {
|
|
498
|
+
used?: true;
|
|
499
|
+
schemaObject: SchemaObject;
|
|
500
|
+
};
|
|
501
|
+
output: {
|
|
502
|
+
used?: true;
|
|
503
|
+
schemaObject: SchemaObject;
|
|
509
504
|
};
|
|
510
505
|
zodType: $ZodType;
|
|
511
506
|
}>;
|
|
@@ -539,4 +534,4 @@ interface ComponentRegistry {
|
|
|
539
534
|
declare const createRegistry: (components?: ZodOpenApiComponentsObject) => ComponentRegistry;
|
|
540
535
|
declare const createComponents: (registry: ComponentRegistry, opts: CreateDocumentOptions) => ComponentsObject;
|
|
541
536
|
//#endregion
|
|
542
|
-
export { BaseParameterObject, CallbackObject, CallbacksObject, ComponentRegistry, ComponentsObject, ContactObject, ContentObject, CreateDocumentOptions, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, IExtensionName, IExtensionType, ISpecificationExtension, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, Override, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, ServerObject, ServerVariableObject, TagObject, XmlObject, ZodObjectInput,
|
|
537
|
+
export { BaseParameterObject, CallbackObject, CallbacksObject, ComponentRegistry, ComponentsObject, ContactObject, ContentObject, CreateDocumentOptions, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, IExtensionName, IExtensionType, ISpecificationExtension, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, Override, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, ServerObject, ServerVariableObject, TagObject, XmlObject, ZodObjectInput, ZodOpenApiCallbackObject, ZodOpenApiCallbacksObject, ZodOpenApiComponentsObject, ZodOpenApiContentObject, ZodOpenApiHeaderObject, ZodOpenApiHeadersObject, ZodOpenApiMediaTypeObject, ZodOpenApiObject, ZodOpenApiOperationObject, ZodOpenApiParameterObject, ZodOpenApiParameters, ZodOpenApiPathItemObject, ZodOpenApiPathsObject, ZodOpenApiRequestBody, ZodOpenApiRequestBodyObject, ZodOpenApiResponseObject, ZodOpenApiResponsesObject, ZodOpenApiSchemaObject, ZodOpenApiVersion, createComponents, createDocument, createRegistry };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseParameterObject, CallbackObject, CallbacksObject, ComponentRegistry, ComponentsObject, ContactObject, ContentObject, CreateDocumentOptions, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, IExtensionName, IExtensionType, ISpecificationExtension, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, Override, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, ServerObject, ServerVariableObject, TagObject, XmlObject, ZodObjectInput,
|
|
1
|
+
import { BaseParameterObject, CallbackObject, CallbacksObject, ComponentRegistry, ComponentsObject, ContactObject, ContentObject, CreateDocumentOptions, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, IExtensionName, IExtensionType, ISpecificationExtension, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, Override, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, ServerObject, ServerVariableObject, TagObject, XmlObject, ZodObjectInput, ZodOpenApiCallbackObject, ZodOpenApiCallbacksObject, ZodOpenApiComponentsObject, ZodOpenApiContentObject, ZodOpenApiHeaderObject, ZodOpenApiHeadersObject, ZodOpenApiMediaTypeObject, ZodOpenApiObject, ZodOpenApiOperationObject, ZodOpenApiParameterObject, ZodOpenApiParameters, ZodOpenApiPathItemObject, ZodOpenApiPathsObject, ZodOpenApiRequestBody, ZodOpenApiRequestBodyObject, ZodOpenApiResponseObject, ZodOpenApiResponsesObject, ZodOpenApiSchemaObject, ZodOpenApiVersion, createDocument } from "./components-26wns3Hd.mjs";
|
|
2
2
|
import { core } from "zod/v4";
|
|
3
3
|
|
|
4
4
|
//#region rolldown:runtime
|
|
@@ -13,11 +13,11 @@ declare const createSchema: (schema: core.$ZodType, ctx?: {
|
|
|
13
13
|
io?: "input" | "output";
|
|
14
14
|
opts?: CreateDocumentOptions;
|
|
15
15
|
}) => {
|
|
16
|
-
schema:
|
|
16
|
+
schema: ReferenceObject | SchemaObject;
|
|
17
17
|
components: Record<string, SchemaObject>;
|
|
18
18
|
};
|
|
19
19
|
declare namespace oas31_d_exports {
|
|
20
20
|
export { BaseParameterObject, CallbackObject, CallbacksObject, ComponentsObject, ContactObject, ContentObject, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, IExtensionName, IExtensionType, ISpecificationExtension, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, ServerObject, ServerVariableObject, TagObject, XmlObject };
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
export { CreateDocumentOptions, Override, SchemaResult, ZodObjectInput,
|
|
23
|
+
export { CreateDocumentOptions, Override, SchemaResult, ZodObjectInput, ZodOpenApiCallbackObject, ZodOpenApiCallbacksObject, ZodOpenApiComponentsObject, ZodOpenApiContentObject, ZodOpenApiHeaderObject, ZodOpenApiHeadersObject, ZodOpenApiMediaTypeObject, ZodOpenApiObject, ZodOpenApiOperationObject, ZodOpenApiParameterObject, ZodOpenApiParameters, ZodOpenApiPathItemObject, ZodOpenApiPathsObject, ZodOpenApiRequestBody, ZodOpenApiRequestBodyObject, ZodOpenApiResponseObject, ZodOpenApiResponsesObject, ZodOpenApiSchemaObject, ZodOpenApiVersion, createDocument, createSchema, oas31_d_exports as oas31 };
|