zod-nest 3.0.2 → 3.2.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/dist/index.mjs CHANGED
@@ -579,11 +579,24 @@ var STRICT_REQUIRES_OVERRIDE = /* @__PURE__ */ new Set([
579
579
  "nan",
580
580
  "custom"
581
581
  ]);
582
+ var ANNOTATION_ONLY_KEYS = /* @__PURE__ */ new Set([
583
+ "title",
584
+ "description",
585
+ "deprecated",
586
+ "examples",
587
+ "default",
588
+ "readOnly",
589
+ "writeOnly",
590
+ "$id",
591
+ "$schema",
592
+ "$comment",
593
+ "id"
594
+ ]);
582
595
  var isStrictlyUnrepresentable = /* @__PURE__ */ __name((jsonSchema, zodSchema) => {
583
596
  if (!STRICT_REQUIRES_OVERRIDE.has(zodSchema._zod.def.type)) {
584
597
  return false;
585
598
  }
586
- return Object.keys(jsonSchema).length === 0;
599
+ return Object.keys(jsonSchema).every((key) => ANNOTATION_ONLY_KEYS.has(key));
587
600
  }, "isStrictlyUnrepresentable");
588
601
  var markPipeCoverage = /* @__PURE__ */ __name((schema, io, covered) => {
589
602
  const def = schema._zod.def;