mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Datamodel now at 100% coverage
working with k8s, stripe, petstore and locals. Speed is as good as I can make it at this point, not without further performance tunupes for memory consumption. less copying everywhere.
This commit is contained in:
@@ -65,6 +65,11 @@ func IsCircular(node *yaml.Node, idx *index.SpecIndex) bool {
|
||||
if refs[i].LoopPoint.Node == node {
|
||||
return true
|
||||
}
|
||||
for k := range refs[i].Journey {
|
||||
if refs[i].Journey[k].Node == node {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
// check mapped references in case we didn't find it.
|
||||
_, nv := utils.FindKeyNode("$ref", node.Content)
|
||||
@@ -86,6 +91,11 @@ func GetCircularReferenceResult(node *yaml.Node, idx *index.SpecIndex) *index.Ci
|
||||
if refs[i].LoopPoint.Node == node {
|
||||
return refs[i]
|
||||
}
|
||||
for k := range refs[i].Journey {
|
||||
if refs[i].Journey[k].Node == node {
|
||||
return refs[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
// check mapped references in case we didn't find it.
|
||||
_, nv := utils.FindKeyNode("$ref", node.Content)
|
||||
|
||||
Reference in New Issue
Block a user