Compare commits

...

2 Commits

Author SHA1 Message Date
Vib Bhardwaj b349a81cdf empty line 2024-08-30 14:35:39 +01:00
Vib Bhardwaj 4973ec3a08 Filter undefined values from schema.allOf 2024-08-30 14:35:21 +01:00
@@ -138,9 +138,10 @@ export function generateSchemaExample(
new Set(ancestors).add(schema),
);
}
if (schema.allOf && schema.allOf.length > 0) {
return schema.allOf.reduce(
const filteredAllOf = schema.allOf && schema.allOf.filter(item => item !== undefined)
if (filteredAllOf && filteredAllOf.length > 0) {
return filteredAllOf.reduce(
(acc, curr) => {
const example = generateSchemaExample(
noReference(curr),