mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Added more support for YAML merge nodes, anchors and aliases
And added deeper support for Aliases. Also added in local file handling through renamed `FSHandler` configuration property for the index. Also re-ran `go fmt` Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -6,6 +6,7 @@ package v3
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"github.com/pb33f/libopenapi/utils"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -39,6 +40,8 @@ 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 {
|
||||
root = utils.NodeAlias(root)
|
||||
utils.CheckForMergeNodes(root)
|
||||
cb.Reference = new(low.Reference)
|
||||
cb.Extensions = low.ExtractExtensions(root)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user