From fd1a2c2537466beb16bc42571f7c9d6ae364d97f Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Mon, 31 May 2021 19:03:00 +0300 Subject: [PATCH] fix: improve label for array type --- src/services/models/Schema.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/services/models/Schema.ts b/src/services/models/Schema.ts index 1f329285..f8971ac4 100644 --- a/src/services/models/Schema.ts +++ b/src/services/models/Schema.ts @@ -179,6 +179,11 @@ export class SchemaModel { if (this.items.isPrimitive) { this.enum = this.items.enum; } + if (Array.isArray(this.type)) { + const filteredType = this.type.filter(item => item !== 'array'); + if (filteredType.length) + this.displayType += ` or ${filteredType.join(' or ')}`; + } } if (this.enum.length && this.options.sortEnumValuesAlphabetically) {