We-worked model to remove resolver.

lookups are performed inline now. keeps things simpler, however it has a performance knock, so it's time to refine async building were possible.
This commit is contained in:
Dave Shanley
2022-08-11 14:54:25 -04:00
parent 7f0e966bd3
commit 248b4daa80
28 changed files with 462 additions and 279 deletions

View File

@@ -372,6 +372,17 @@ func IsNodeBoolValue(node *yaml.Node) bool {
return node.Tag == "!!bool"
}
func IsNodeRefValue(node *yaml.Node) (bool, *yaml.Node, string) {
for i, r := range node.Content {
if i%2 == 0 {
if r.Value == "$ref" {
return true, r, node.Content[i+1].Value
}
}
}
return false, nil, ""
}
// FixContext will clean up a JSONpath string to be correctly traversable.
func FixContext(context string) string {