mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
added in keynode support
soemthing that has been waiting to be filled in for some time. Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
type Callback struct {
|
||||
Expression *orderedmap.Map[low.KeyReference[string], low.ValueReference[*PathItem]]
|
||||
Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
|
||||
KeyNode *yaml.Node
|
||||
*low.Reference
|
||||
}
|
||||
|
||||
@@ -40,7 +41,8 @@ func (cb *Callback) FindExpression(exp string) *low.ValueReference[*PathItem] {
|
||||
}
|
||||
|
||||
// Build will extract extensions, expressions and PathItem objects for Callback
|
||||
func (cb *Callback) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error {
|
||||
func (cb *Callback) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error {
|
||||
cb.KeyNode = keyNode
|
||||
root = utils.NodeAlias(root)
|
||||
utils.CheckForMergeNodes(root)
|
||||
cb.Reference = new(low.Reference)
|
||||
|
||||
Reference in New Issue
Block a user