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:
quobix
2023-12-31 14:19:38 -05:00
parent 3dafa57aa9
commit 63354654bf
25 changed files with 80 additions and 29 deletions

View File

@@ -24,6 +24,7 @@ type OAuthFlows struct {
ClientCredentials low.NodeReference[*OAuthFlow]
AuthorizationCode low.NodeReference[*OAuthFlow]
Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
KeyNode *yaml.Node
*low.Reference
}
@@ -38,7 +39,8 @@ func (o *OAuthFlows) FindExtension(ext string) *low.ValueReference[*yaml.Node] {
}
// Build will extract extensions and all OAuthFlow types from the supplied node.
func (o *OAuthFlows) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error {
func (o *OAuthFlows) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error {
o.KeyNode = keyNode
root = utils.NodeAlias(root)
utils.CheckForMergeNodes(root)
o.Reference = new(low.Reference)