fix: use array items example

fixes #408
This commit is contained in:
Roman Hotsiy 2018-01-21 21:04:14 +02:00
parent 96fb7ce436
commit 12f79f081a
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -139,6 +139,9 @@ export class SchemaModel {
this.displayType = this.items.displayType; this.displayType = this.items.displayType;
this.typePrefix = this.items.typePrefix + 'Array of '; this.typePrefix = this.items.typePrefix + 'Array of ';
this.isPrimitive = this.items.isPrimitive; this.isPrimitive = this.items.isPrimitive;
if (this.example === undefined && this.items.example !== undefined) {
this.example = [this.items.example];
}
if (this.items.isPrimitive) { if (this.items.isPrimitive) {
this.enum = this.items.enum; this.enum = this.items.enum;
} }