zod-openapi 5.4.0 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_components = require('./components-C8ab2kZS.cjs');
1
+ const require_components = require('./components-y0WDbAMK.cjs');
2
2
 
3
3
  exports.createComponents = require_components.createComponents;
4
4
  exports.createRegistry = require_components.createRegistry;
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { createComponents, createRegistry, isAnyZodType, unwrapZodObject } from "./components-D0GND9iu.js";
1
+ import { createComponents, createRegistry, isAnyZodType, unwrapZodObject } from "./components-DTiQQs5D.js";
2
2
 
3
3
  export { createComponents, createRegistry, isAnyZodType, unwrapZodObject };
@@ -1,5 +1,5 @@
1
1
  import { globalRegistry } from "zod/v4/core";
2
- import { object, registry, toJSONSchema as toJSONSchema$1 } from "zod/v4";
2
+ import { globalRegistry as globalRegistry$1, object, registry, toJSONSchema as toJSONSchema$1 } from "zod/v4";
3
3
 
4
4
  //#region src/zod.ts
5
5
  const isAnyZodType = (schema) => typeof schema === "object" && schema !== null && "_zod" in schema;
@@ -230,7 +230,7 @@ const override = (ctx) => {
230
230
  }
231
231
  ctx.jsonSchema.discriminator.mapping = mapping;
232
232
  }
233
- const meta = ctx.zodSchema.meta();
233
+ const meta = globalRegistry$1.get(ctx.zodSchema);
234
234
  if (typeof meta?.unionOneOf === "boolean") {
235
235
  if (meta.unionOneOf) {
236
236
  ctx.jsonSchema.oneOf = ctx.jsonSchema.anyOf;
@@ -379,7 +379,7 @@ const createSchemas = (schemas, ctx) => {
379
379
  const outputIds = /* @__PURE__ */ new Map();
380
380
  const jsonSchema = toJSONSchema$1(zodRegistry, {
381
381
  override(context) {
382
- const meta = context.zodSchema.meta();
382
+ const meta = globalRegistry$1.get(context.zodSchema);
383
383
  if (meta?.outputId && meta?.id) outputIds.set(meta.id, meta.outputId);
384
384
  if (context.jsonSchema.$ref) return;
385
385
  const enrichedContext = {
@@ -21,8 +21,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  }) : target, mod));
22
22
 
23
23
  //#endregion
24
- const zod_v4_core = __toESM(require("zod/v4/core"));
25
- const zod_v4 = __toESM(require("zod/v4"));
24
+ let zod_v4_core = require("zod/v4/core");
25
+ zod_v4_core = __toESM(zod_v4_core);
26
+ let zod_v4 = require("zod/v4");
27
+ zod_v4 = __toESM(zod_v4);
26
28
 
27
29
  //#region src/zod.ts
28
30
  const isAnyZodType = (schema) => typeof schema === "object" && schema !== null && "_zod" in schema;
@@ -253,7 +255,7 @@ const override = (ctx) => {
253
255
  }
254
256
  ctx.jsonSchema.discriminator.mapping = mapping;
255
257
  }
256
- const meta = ctx.zodSchema.meta();
258
+ const meta = zod_v4.globalRegistry.get(ctx.zodSchema);
257
259
  if (typeof meta?.unionOneOf === "boolean") {
258
260
  if (meta.unionOneOf) {
259
261
  ctx.jsonSchema.oneOf = ctx.jsonSchema.anyOf;
@@ -402,7 +404,7 @@ const createSchemas = (schemas, ctx) => {
402
404
  const outputIds = /* @__PURE__ */ new Map();
403
405
  const jsonSchema = (0, zod_v4.toJSONSchema)(zodRegistry, {
404
406
  override(context) {
405
- const meta = context.zodSchema.meta();
407
+ const meta = zod_v4.globalRegistry.get(context.zodSchema);
406
408
  if (meta?.outputId && meta?.id) outputIds.set(meta.id, meta.outputId);
407
409
  if (context.jsonSchema.$ref) return;
408
410
  const enrichedContext = {
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_components = require('./components-C8ab2kZS.cjs');
1
+ const require_components = require('./components-y0WDbAMK.cjs');
2
2
 
3
3
  //#region src/create/document.ts
4
4
  const createDocument = (zodOpenApiObject, opts = {}) => {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createComponents, createPaths, createRegistry, createSchema } from "./components-D0GND9iu.js";
1
+ import { createComponents, createPaths, createRegistry, createSchema } from "./components-DTiQQs5D.js";
2
2
 
3
3
  //#region src/create/document.ts
4
4
  const createDocument = (zodOpenApiObject, opts = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod-openapi",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "Convert Zod Schemas to OpenAPI v3.x documentation",
5
5
  "keywords": [
6
6
  "typescript",
@@ -45,18 +45,18 @@
45
45
  "@arethetypeswrong/cli": "0.18.2",
46
46
  "@changesets/changelog-github": "0.5.1",
47
47
  "@changesets/cli": "2.29.6",
48
- "@redocly/cli": "2.0.2",
48
+ "@redocly/cli": "2.0.8",
49
49
  "@types/node": "22.15.21",
50
50
  "@vitest/coverage-v8": "3.2.4",
51
51
  "@zod-openapi/openapi3-ts": "1.0.0",
52
52
  "ajv": "8.17.1",
53
53
  "eslint-plugin-import-zod": "1.2.0",
54
54
  "eslint-plugin-zod-openapi": "2.0.0",
55
- "skuba": "12.1.1",
56
- "tsdown": "0.14.0",
55
+ "skuba": "12.2.0",
56
+ "tsdown": "0.14.2",
57
57
  "vitest": "3.2.4",
58
58
  "yaml": "2.8.1",
59
- "zod": "4.1.1"
59
+ "zod": "4.1.5"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "zod": "^3.25.74 || ^4.0.0"