Ignore array values defined as ‘$ref’ they are invalid to lookup.
This commit is contained in:
quobix
2024-04-20 14:21:55 -04:00
parent b4b24a02f3
commit ac4b6ecd31
2 changed files with 9 additions and 0 deletions

View File

@@ -215,6 +215,10 @@ func (index *SpecIndex) ExtractRefs(node, parent *yaml.Node, seenPath []string,
if !utils.IsNodeStringValue(node.Content[i+1]) {
continue
}
// issue #481, don't look at refs in arrays, the next node isn't the value.
if utils.IsNodeArray(node) {
continue
}
}
index.linesWithRefs[n.Line] = true