Skip to content

Commit

Permalink
added null check for paramRef when scanning operation params.
Browse files Browse the repository at this point in the history
this issue was discovered in daveshanley/vacuum#240, this provides a resolution to the problem.
  • Loading branch information
daveshanley committed Feb 27, 2023
1 parent 4901813 commit 0850ceb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index/utility_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@ func (index *SpecIndex) scanOperationParams(params []*yaml.Node, pathItemNode *y
Path: path,
})
} else {
index.paramOpRefs[pathItemNode.Value][method][paramRefName] =
append(index.paramOpRefs[pathItemNode.Value][method][paramRefName], paramRef)
if paramRef != nil {
index.paramOpRefs[pathItemNode.Value][method][paramRefName] =
append(index.paramOpRefs[pathItemNode.Value][method][paramRefName], paramRef)
}
}

continue
Expand Down

0 comments on commit 0850ceb

Please sign in to comment.