fix: MergeAll takes items into account (#511)

This commit is contained in:
Jérémy Derussé 2018-05-31 11:59:55 +02:00 committed by Roman Hotsiy
parent 370d08aa1a
commit 47b2177f58

View File

@ -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) { if (subSchema.required !== undefined) {
receiver.required = (receiver.required || []).concat(subSchema.required); receiver.required = (receiver.required || []).concat(subSchema.required);
} }