zod-openapi 5.0.0-beta.19 → 5.0.0-beta.20
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.js
CHANGED
package/dist/api.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createComponents, createRegistry, isAnyZodType, unwrapZodObject } from "./components-
|
|
1
|
+
import { createComponents, createRegistry, isAnyZodType, unwrapZodObject } from "./components-BVy-T4wz.mjs";
|
|
2
2
|
|
|
3
3
|
export { createComponents, createRegistry, isAnyZodType, unwrapZodObject };
|
|
@@ -214,8 +214,8 @@ const override = (ctx) => {
|
|
|
214
214
|
const discriminatorValues = def.options[Number(index)]._zod.propValues?.[def.discriminator];
|
|
215
215
|
if (!discriminatorValues?.size) return;
|
|
216
216
|
for (const value of [...discriminatorValues ?? []]) {
|
|
217
|
-
if (typeof value !== "string") return;
|
|
218
|
-
mapping[value] = ref;
|
|
217
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return;
|
|
218
|
+
mapping[String(value)] = ref;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
ctx.jsonSchema.discriminator.mapping = mapping;
|
|
@@ -237,8 +237,8 @@ const override = (ctx) => {
|
|
|
237
237
|
const discriminatorValues = def.options[Number(index)]._zod.propValues?.[def.discriminator];
|
|
238
238
|
if (!discriminatorValues?.size) return;
|
|
239
239
|
for (const value of [...discriminatorValues ?? []]) {
|
|
240
|
-
if (typeof value !== "string") return;
|
|
241
|
-
mapping[value] = ref;
|
|
240
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return;
|
|
241
|
+
mapping[String(value)] = ref;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
ctx.jsonSchema.discriminator.mapping = mapping;
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createComponents, createPaths, createRegistry, createSchema } from "./components-
|
|
1
|
+
import { createComponents, createPaths, createRegistry, createSchema } from "./components-BVy-T4wz.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/create/document.ts
|
|
4
4
|
const createDocument = (zodOpenApiObject, opts = {}) => {
|