fix: false-positive recursive tag case when using oneOf + allOf (#1534)

This commit is contained in:
Roman Hotsiy 2021-02-15 14:50:35 +02:00 committed by GitHub
parent 524e512b94
commit 8270481e9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,10 +261,12 @@ export class OpenAPIParser {
receiver.properties[prop] = subSchema.properties[prop];
} else {
// merge inner properties
receiver.properties[prop] = this.mergeAllOf(
const mergedProp = this.mergeAllOf(
{ allOf: [receiver.properties[prop], subSchema.properties[prop]] },
$ref + '/properties/' + prop,
);
receiver.properties[prop] = mergedProp
this.exitParents(mergedProp); // every prop resolution should have separate recursive stack
}
}
}