Fixed: if not given cannnot be null default

This commit is contained in:
Mitko Iliev
2025-04-19 00:05:56 +03:00
parent bbe4924c88
commit b9c58252a1

View File

@@ -13,7 +13,7 @@ export function generateDefaultValue(schema: JsonSchemaType): JsonValue {
if (!schema.required) {
if (schema.type === "array") return [];
if (schema.type === "object") return {};
return null;
return undefined;
}
switch (schema.type) {