mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 04:20:14 +00:00
(fix): during testing found a missed case for #25
Forgot a section of code to add new feature to, just so happened to be the one I wasn't testing. Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -239,12 +239,12 @@ func ExtractArray[T Buildable[N], N any](label string, root *yaml.Node, idx *ind
|
||||
} else {
|
||||
_, ln, vn = utils.FindKeyNodeFullTop(label, root.Content)
|
||||
if vn != nil {
|
||||
if h, _, rv := utils.IsNodeRefValue(vn); h {
|
||||
if h, _, rVal := utils.IsNodeRefValue(vn); h {
|
||||
ref, err := LocateRefNode(vn, idx)
|
||||
if ref != nil {
|
||||
vn = ref
|
||||
isReference = true
|
||||
referenceValue = rv
|
||||
referenceValue = rVal
|
||||
if err != nil {
|
||||
circError = err
|
||||
}
|
||||
@@ -263,10 +263,12 @@ func ExtractArray[T Buildable[N], N any](label string, root *yaml.Node, idx *ind
|
||||
return []ValueReference[T]{}, nil, nil, fmt.Errorf("array build failed, input is not an array, line %d, column %d", vn.Line, vn.Column)
|
||||
}
|
||||
for _, node := range vn.Content {
|
||||
if rf, _, _ := utils.IsNodeRefValue(node); rf {
|
||||
if rf, _, rv := utils.IsNodeRefValue(node); rf {
|
||||
ref, err := LocateRefNode(node, idx)
|
||||
if ref != nil {
|
||||
node = ref
|
||||
isReference = true
|
||||
referenceValue = rv
|
||||
if err != nil {
|
||||
circError = err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user