Skip to content

Commit 56eaef7

Browse files
author
Christian
committed
fix: extract extensions of child items in case it is a single object
1 parent 3658b6d commit 56eaef7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/services/models/Schema.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ export class SchemaModel {
9696

9797
if (options.showExtensions) {
9898
this.extensions = extractExtensions(this.schema, options.showExtensions);
99+
100+
if (typeof this.schema.items === 'object') {
101+
this.extensions = {
102+
...this.extensions,
103+
...extractExtensions(this.schema.items, options.showExtensions),
104+
};
105+
}
99106
}
100107
}
101108

@@ -459,7 +466,6 @@ function buildFields(
459466
refsStack,
460467
);
461468
});
462-
463469
if (options.sortPropsAlphabetically) {
464470
fields = sortByField(fields, 'name');
465471
}

0 commit comments

Comments
 (0)