Closed ParsonsProjects closed 5 months ago
Describe the bug Version: 9.1.2 There is no fallback function for when excludedPathMatcher is undefined.
excludedPathMatcher
To Reproduce Call the deference function with no function argument for excludedPathMatcher;
const dereference = require('@apidevtools/json-schema-ref-parser/lib/dereference'); dereference(handler, { parse: {}, dereference: {});
Actual behavior An error is thrown saying that the isExcludedPath is not a function.
isExcludedPath
Expected behavior No error is thrown
Fix Update the following line https://github.com/APIDevTools/json-schema-ref-parser/blob/v9.1.2/lib/dereference.js#L44 to let isExcludedPath = options.dereference.excludedPathMatcher || (() => false);
let isExcludedPath = options.dereference.excludedPathMatcher || (() => false);
Fixed in v10
Describe the bug Version: 9.1.2 There is no fallback function for when
excludedPathMatcher
is undefined.To Reproduce Call the deference function with no function argument for
excludedPathMatcher
;Actual behavior An error is thrown saying that the
isExcludedPath
is not a function.Expected behavior No error is thrown
Fix Update the following line https://github.com/APIDevTools/json-schema-ref-parser/blob/v9.1.2/lib/dereference.js#L44 to
let isExcludedPath = options.dereference.excludedPathMatcher || (() => false);