mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Starting work on oAuth Flows.
This commit is contained in:
@@ -1,24 +1,31 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
"gopkg.in/yaml.v3"
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
type SecurityScheme struct {
|
||||
Node *yaml.Node
|
||||
Type low.NodeReference[string]
|
||||
Description low.NodeReference[string]
|
||||
Name low.NodeReference[string]
|
||||
In low.NodeReference[string]
|
||||
Scheme low.NodeReference[string]
|
||||
BearerFormat low.NodeReference[string]
|
||||
Flows OAuthFlows
|
||||
OpenIdConnectURL low.NodeReference[string]
|
||||
Extensions map[string]low.ObjectReference
|
||||
Type low.NodeReference[string]
|
||||
Description low.NodeReference[string]
|
||||
Name low.NodeReference[string]
|
||||
In low.NodeReference[string]
|
||||
Scheme low.NodeReference[string]
|
||||
BearerFormat low.NodeReference[string]
|
||||
Flows low.NodeReference[*OAuthFlows]
|
||||
OpenIdConnectURL low.NodeReference[string]
|
||||
Extensions map[low.KeyReference[string]]low.ValueReference[any]
|
||||
}
|
||||
|
||||
func (ss *SecurityScheme) Build(root *yaml.Node) error {
|
||||
extensionMap, err := ExtractExtensions(root)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ss.Extensions = extensionMap
|
||||
return nil
|
||||
}
|
||||
|
||||
type SecurityRequirement struct {
|
||||
Node *yaml.Node
|
||||
Value []low.NodeReference[string]
|
||||
Value low.NodeReference[[]low.ValueReference[string]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user