Minor fix joinAllOf

This commit is contained in:
Roman Hotsiy 2016-03-27 13:35:06 +03:00
parent e50d59ef6b
commit 36034d4d1a

View File

@ -185,13 +185,13 @@ export class BaseComponent {
throw new Error(errMessage);
}
into.type = into.type || subSchema.type;
if (into.type === 'array') {
console.warn('allOf: subschemas with type array are not supported yet');
}
// TODO: add check if can be merged correctly (no different properties with the same name)
into.type = into.type || subSchema.type;
if (into.type === 'object' && subSchema.properties) {
into.properties || (into.properties = {});
Object.assign(into.properties, subSchema.properties);