Fixed: if not given cannnot be null default
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user