We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51eb7cf commit cf2778aCopy full SHA for cf2778a
client/src/utils/schemaUtils.ts
@@ -113,13 +113,13 @@ export function generateDefaultValue(
113
const obj: JsonObject = {};
114
// Only include properties that are required according to the schema's required array
115
Object.entries(schema.properties).forEach(([key, prop]) => {
116
- const isPropertyRequired = schema.required?.includes(key) ?? false;
117
- if (isPropertyRequired) {
+ if (isPropertyRequired(key, schema)) {
118
const value = generateDefaultValue(prop, key, schema);
119
if (value !== undefined) {
120
obj[key] = value;
121
}
122
+
123
});
124
return obj;
125
0 commit comments