mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Fixed a low level bug with locating nodes.
locating nodes was looking through two levels to locate something. This is not the correct behavior, after making the change - lots of tests needed to be updated to be correct in what they put into as a the root node.
This commit is contained in:
@@ -26,7 +26,7 @@ x-hack: code`
|
||||
|
||||
// build low
|
||||
var lowExample lowbase.Example
|
||||
_ = lowmodel.BuildModel(&cNode, &lowExample)
|
||||
_ = lowmodel.BuildModel(cNode.Content[0], &lowExample)
|
||||
|
||||
_ = lowExample.Build(cNode.Content[0], nil)
|
||||
|
||||
@@ -50,7 +50,7 @@ func TestExtractExamples(t *testing.T) {
|
||||
|
||||
// build low
|
||||
var lowExample lowbase.Example
|
||||
_ = lowmodel.BuildModel(&cNode, &lowExample)
|
||||
_ = lowmodel.BuildModel(cNode.Content[0], &lowExample)
|
||||
|
||||
_ = lowExample.Build(cNode.Content[0], nil)
|
||||
|
||||
@@ -79,7 +79,7 @@ x-hack: code`
|
||||
|
||||
// build low-level example
|
||||
var lowExample lowbase.Example
|
||||
_ = lowmodel.BuildModel(&node, &lowExample)
|
||||
_ = lowmodel.BuildModel(node.Content[0], &lowExample)
|
||||
|
||||
// build out low-level example
|
||||
_ = lowExample.Build(node.Content[0], nil)
|
||||
@@ -90,4 +90,4 @@ x-hack: code`
|
||||
fmt.Print(highExample.ExternalValue)
|
||||
// Output: https://pb33f.io
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user