From c3bbdddd01932421620076cdd14c475ba27bdf1c Mon Sep 17 00:00:00 2001 From: Darren Yong Date: Thu, 19 Oct 2023 14:22:57 -0700 Subject: [PATCH] refactor: revert logic --- lib/dereference.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dereference.js b/lib/dereference.js index 370faa51..0e1e4ab3 100644 --- a/lib/dereference.js +++ b/lib/dereference.js @@ -84,7 +84,7 @@ function crawl(obj, path, pathFromRoot, parents, processedObjects, dereferencedC const keyPathFromRoot = Pointer.join(pathFromRoot, key); const value = obj[key]; - if (value?.$ref?.substring(0, 2) !== '#/') { + if (value?.$ref?.substring(0, 11) === '#components') { throw new InvalidPointerError(value.$ref, keyPath); }