-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Problem statement
When using swagger expand
on a Swagger document with a OAuth2 flow: application security definition, expand
adds an invalid empty string key authorizationUrl to the security definition.
The authorizationUrl key is only valid when used with flow: implicit or accessCode, not with application.
Swagger specification
swagger: "2.0"
securityDefinitions:
OAuth2:
type: oauth2
flow: application
tokenUrl: https://example.com/oauth/token
Steps to reproduce
- Run
swagger expand test.yaml
- The output contains an empty string key authorizationUrl in the key
swagger: "2.0"
paths: null
securityDefinitions:
OAuth2:
type: oauth2
flow: application
authorizationUrl: ""
tokenUrl: https://example.com/oauth/token
Environment
swagger version:
version: v0.26.0
commit: 640fa2f19f215cda0b815a4bb9a26aae2bd477d2
go version:
go version go1.15.3 darwin/amd64
OS: Mac OSX 10.14.5