Skip to content

Commit

Permalink
fix: use array items example
Browse files Browse the repository at this point in the history
fixes #408
  • Loading branch information
RomanHotsiy committed Jan 21, 2018
1 parent 96fb7ce commit 12f79f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/models/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export class SchemaModel {
this.displayType = this.items.displayType;
this.typePrefix = this.items.typePrefix + 'Array of ';
this.isPrimitive = this.items.isPrimitive;
if (this.example === undefined && this.items.example !== undefined) {
this.example = [this.items.example];
}
if (this.items.isPrimitive) {
this.enum = this.items.enum;
}
Expand Down

0 comments on commit 12f79f0

Please sign in to comment.