Skip to content

Commit

Permalink
fix: extract extensions of child items in case it is a single object
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian committed Jul 15, 2024
1 parent 3658b6d commit 56eaef7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/models/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
}
}
}

Expand Down Expand Up @@ -459,7 +466,6 @@ function buildFields(
refsStack,
);
});

if (options.sortPropsAlphabetically) {
fields = sortByField(fields, 'name');
}
Expand Down

0 comments on commit 56eaef7

Please sign in to comment.