From 8270481e9f0f381b392f7921d21cb06e0e673b6d Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 15 Feb 2021 14:50:35 +0200 Subject: [PATCH] fix: false-positive recursive tag case when using oneOf + allOf (#1534) --- src/services/OpenAPIParser.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/OpenAPIParser.ts b/src/services/OpenAPIParser.ts index 489769ee5a..b0d3a8f446 100644 --- a/src/services/OpenAPIParser.ts +++ b/src/services/OpenAPIParser.ts @@ -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 } } }