From 09c589aaea144b8d75e873fe11ca7f39fb10a442 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Mon, 16 Jan 2023 18:22:09 +0100 Subject: [PATCH] feat(resolver): limit depth of dereference to max 100 This change is specific to OpenAPI 3.1.0 strategy. --- src/resolver/strategies/openapi-3-1.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resolver/strategies/openapi-3-1.js b/src/resolver/strategies/openapi-3-1.js index 40747f83d..7f0acc556 100644 --- a/src/resolver/strategies/openapi-3-1.js +++ b/src/resolver/strategies/openapi-3-1.js @@ -90,6 +90,7 @@ const resolveOpenAPI31Strategy = async (options) => { ], }, dereference: { + maxDepth: 100, strategies: [ OpenApi3_1SwaggerClientDereferenceStrategy({ allowMetaPatches,