feat: add support array in field type

This commit is contained in:
Alex Varchuk 2021-05-18 12:09:04 +03:00
parent 4b072be8d1
commit 2f85d42360

View File

@ -114,7 +114,7 @@ export class SchemaModel {
this.externalDocs = schema.externalDocs;
this.constraints = humanizeConstraints(schema);
this.displayType = this.type;
this.displayType = Array.isArray(this.type) ? this.type.join(' or ') : this.type;
this.displayFormat = this.format;
this.isPrimitive = isPrimitiveType(schema, this.type);
this.default = schema.default;