added null check for paramRef when scanning operation params.

this issue was discovered in https://github.com/daveshanley/vacuum/issues/240, this provides a resolution to the problem.
This commit is contained in:
Dave Shanley
2023-02-27 10:53:20 -05:00
parent 4901813e88
commit 0850ceb272

View File

@@ -302,8 +302,10 @@ func (index *SpecIndex) scanOperationParams(params []*yaml.Node, pathItemNode *y
Path: path, Path: path,
}) })
} else { } else {
index.paramOpRefs[pathItemNode.Value][method][paramRefName] = if paramRef != nil {
append(index.paramOpRefs[pathItemNode.Value][method][paramRefName], paramRef) index.paramOpRefs[pathItemNode.Value][method][paramRefName] =
append(index.paramOpRefs[pathItemNode.Value][method][paramRefName], paramRef)
}
} }
continue continue