full site update
This commit is contained in:
3
node_modules/zod-to-json-schema/dist/esm/parsers/object.js
generated
vendored
3
node_modules/zod-to-json-schema/dist/esm/parsers/object.js
generated
vendored
@@ -1,4 +1,3 @@
|
||||
import { ZodOptional } from "zod";
|
||||
import { parseDef } from "../parseDef.js";
|
||||
export function parseObjectDef(def, refs) {
|
||||
const forceOptionalIntoNullable = refs.target === "openAi";
|
||||
@@ -15,7 +14,7 @@ export function parseObjectDef(def, refs) {
|
||||
}
|
||||
let propOptional = safeIsOptional(propDef);
|
||||
if (propOptional && forceOptionalIntoNullable) {
|
||||
if (propDef instanceof ZodOptional) {
|
||||
if (propDef._def.typeName === "ZodOptional") {
|
||||
propDef = propDef._def.innerType;
|
||||
}
|
||||
if (!propDef.isNullable()) {
|
||||
|
Reference in New Issue
Block a user