Skip to content

Commit

Permalink
fix: MergeAll takes items into account (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse authored and RomanHotsiy committed May 31, 2018
1 parent 370d08a commit 47b2177
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/services/OpenAPIParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,15 @@ export class OpenAPIParser {
}
}

if (subSchema.items !== undefined) {
receiver.items = receiver.items || {};
// merge inner properties
receiver.items = this.mergeAllOf(
{ allOf: [receiver.items, subSchema.items] },
$ref + '/items',
);
}

if (subSchema.required !== undefined) {
receiver.required = (receiver.required || []).concat(subSchema.required);
}
Expand Down

0 comments on commit 47b2177

Please sign in to comment.