fix: extract extensions of child items in case it is a single object

This commit is contained in:
Christian 2024-07-15 16:31:32 +02:00
parent 3658b6def4
commit 56eaef76ff

View File

@ -96,6 +96,13 @@ export class SchemaModel {
if (options.showExtensions) {
this.extensions = extractExtensions(this.schema, options.showExtensions);
if (typeof this.schema.items === 'object') {
this.extensions = {
...this.extensions,
...extractExtensions(this.schema.items, options.showExtensions),
};
}
}
}
@ -459,7 +466,6 @@ function buildFields(
refsStack,
);
});
if (options.sortPropsAlphabetically) {
fields = sortByField(fields, 'name');
}