From 56eaef76ff34113890684446a8dd1d4b544d170c Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 15 Jul 2024 16:31:32 +0200 Subject: [PATCH] fix: extract extensions of child items in case it is a single object --- src/services/models/Schema.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/services/models/Schema.ts b/src/services/models/Schema.ts index 44b04279e0..462f27b3b0 100644 --- a/src/services/models/Schema.ts +++ b/src/services/models/Schema.ts @@ -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'); }