fix: improve label for array type

This commit is contained in:
Alex Varchuk 2021-05-31 19:03:00 +03:00
parent ce264112f2
commit fd1a2c2537

View File

@ -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) {