mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 12:37:48 +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 {
|
} else {
|
||||||
_, ln, vn = utils.FindKeyNodeFullTop(label, root.Content)
|
_, ln, vn = utils.FindKeyNodeFullTop(label, root.Content)
|
||||||
if vn != nil {
|
if vn != nil {
|
||||||
if h, _, rv := utils.IsNodeRefValue(vn); h {
|
if h, _, rVal := utils.IsNodeRefValue(vn); h {
|
||||||
ref, err := LocateRefNode(vn, idx)
|
ref, err := LocateRefNode(vn, idx)
|
||||||
if ref != nil {
|
if ref != nil {
|
||||||
vn = ref
|
vn = ref
|
||||||
isReference = true
|
isReference = true
|
||||||
referenceValue = rv
|
referenceValue = rVal
|
||||||
if err != nil {
|
if err != nil {
|
||||||
circError = err
|
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)
|
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 {
|
for _, node := range vn.Content {
|
||||||
if rf, _, _ := utils.IsNodeRefValue(node); rf {
|
if rf, _, rv := utils.IsNodeRefValue(node); rf {
|
||||||
ref, err := LocateRefNode(node, idx)
|
ref, err := LocateRefNode(node, idx)
|
||||||
if ref != nil {
|
if ref != nil {
|
||||||
node = ref
|
node = ref
|
||||||
|
isReference = true
|
||||||
|
referenceValue = rv
|
||||||
if err != nil {
|
if err != nil {
|
||||||
circError = err
|
circError = err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user