aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-openapi/spec/security_scheme.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-openapi/spec/security_scheme.go')
-rw-r--r--vendor/github.com/go-openapi/spec/security_scheme.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/go-openapi/spec/security_scheme.go b/vendor/github.com/go-openapi/spec/security_scheme.go
index f7176ef6ae..9d0bdae908 100644
--- a/vendor/github.com/go-openapi/spec/security_scheme.go
+++ b/vendor/github.com/go-openapi/spec/security_scheme.go
@@ -125,8 +125,8 @@ func (s SecurityScheme) MarshalJSON() ([]byte, error) {
err error
)
- if s.Type == oauth2 {
- // when oauth2, empty AuthorizationURL is added as empty string
+ if s.Type == oauth2 && (s.Flow == "implicit" || s.Flow == "accessCode") {
+ // when oauth2 for implicit or accessCode flows, empty AuthorizationURL is added as empty string
b1, err = json.Marshal(s.SecuritySchemeProps)
} else {
// when not oauth2, empty AuthorizationURL should be omitted