Skip to content

Commit 12f79f0

Browse files
committed
fix: use array items example
fixes #408
1 parent 96fb7ce commit 12f79f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/models/Schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ export class SchemaModel {
139139
this.displayType = this.items.displayType;
140140
this.typePrefix = this.items.typePrefix + 'Array of ';
141141
this.isPrimitive = this.items.isPrimitive;
142+
if (this.example === undefined && this.items.example !== undefined) {
143+
this.example = [this.items.example];
144+
}
142145
if (this.items.isPrimitive) {
143146
this.enum = this.items.enum;
144147
}

0 commit comments

Comments
 (0)