Merge branch 'main' into Baliedge/PIP-2552-consistent-ordering

This commit is contained in:
Tristan Cartledge
2023-11-27 12:06:39 +00:00
219 changed files with 20934 additions and 4697 deletions

View File

@@ -4,6 +4,7 @@
package v3
import (
"context"
"crypto/sha256"
"fmt"
"sort"
@@ -41,7 +42,7 @@ func (cb *Callback) FindExpression(exp string) *low.ValueReference[*PathItem] {
}
// Build will extract extensions, expressions and PathItem objects for Callback
func (cb *Callback) Build(_, root *yaml.Node, idx *index.SpecIndex) error {
func (cb *Callback) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error {
root = utils.NodeAlias(root)
utils.CheckForMergeNodes(root)
cb.Reference = new(low.Reference)
@@ -59,7 +60,7 @@ func (cb *Callback) Build(_, root *yaml.Node, idx *index.SpecIndex) error {
if strings.HasPrefix(currentCB.Value, "x-") {
continue // ignore extension.
}
callback, eErr, _, rv := low.ExtractObjectRaw[*PathItem](currentCB, callbackNode, idx)
callback, eErr, _, rv := low.ExtractObjectRaw[*PathItem](ctx, currentCB, callbackNode, idx)
if eErr != nil {
return eErr
}