mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 12:37:49 +00:00
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:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user