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:
Dave Shanley
2022-08-30 09:07:03 -04:00
parent 983811e29f
commit 4771f8d7e9
7 changed files with 341 additions and 24 deletions

View File

@@ -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)