@anatine/zod-openapi
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "@anatine/zod-openapi", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Zod to OpenAPI converter", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -107,5 +107,7 @@ "use strict"; | ||
function parseObject({ zodRef, schemas, useOutput, }) { | ||
var _a; | ||
let additionalProperties; | ||
// `catchall` obviates `strict`, `strip`, and `passthrough` | ||
if (!(zodRef._def.catchall instanceof zod_1.z.ZodNever)) | ||
if (!(zodRef._def.catchall instanceof zod_1.z.ZodNever || | ||
((_a = zodRef._def.catchall) === null || _a === void 0 ? void 0 : _a._def.typeName) === 'ZodNever')) | ||
additionalProperties = generateSchema(zodRef._def.catchall, useOutput); | ||
@@ -122,4 +124,6 @@ else if (zodRef._def.unknownKeys === 'passthrough') | ||
const item = zodRef.shape[key]; | ||
return (!(item.isOptional() || item instanceof zod_1.z.ZodDefault) && | ||
!(item instanceof zod_1.z.ZodNever)); | ||
return (!(item.isOptional() || | ||
item instanceof zod_1.z.ZodDefault || | ||
item._def.typeName === 'ZodDefault') && | ||
!(item instanceof zod_1.z.ZodNever || item._def.typeName === 'ZodDefault')); | ||
}) }, additionalProperties), ...schemas); | ||
@@ -126,0 +130,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23292
272