Merge pull request #275 from postmanlabs/feature/fix-root-path-mismatch

Fixed issue where root path was not matched during validation.
This commit is contained in:
Vishal Shingala
2020-08-07 16:33:37 +05:30
committed by GitHub
2 changed files with 21 additions and 0 deletions

View File

@@ -3616,6 +3616,15 @@ module.exports = {
}
});
// handle root path '/'
if (postmanPath === '/' && schemaPath === '/') {
anyMatchFound = true;
maxScoreFound = 1; // assign max possible score
matchedPathVars = []; // no path variables present
fixedMatchedSegments = 0;
variableMatchedSegments = 0;
}
if (anyMatchFound) {
return {
match: true,