Describe the bug
- If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible:
- A clear and concise description of what the bug is: the title of an issue is not enough
When written in SwaggerHub, adding "securitySchemes" automatically enable "Authorize" button for user to get access token. However, Springdoc does not show such button.
To Reproduce
Steps to reproduce the behavior:
- What version of spring-boot you are using? 2.2.6.RELEASE
- What modules and versions of springdoc-openapi are you using? springdoc-openapi-ui and springdoc-openapi-security both running on 1.3.4
- What is the actual and the expected result using OpenAPI Description (yml or json)?
- Provide with a sample code (HelloController) or Test that reproduces the problem
Below is code that I use.
`
@bean
public SecurityScheme oauth() {
return new SecurityScheme()
.name("user_grant")
.type(Type.OAUTH2)
.in(In.HEADER)
.bearerFormat("jwt")
.flows(
new OAuthFlows()
.password(
new OAuthFlow()
.authorizationUrl(authServer + "/token")
.scopes(new Scopes().addString("CLIENT", "for client operations"))));
}
@bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.components(new Components())
.info(
new Info()
.title("Message service")
.description("This documents message-service API")
.version(buildProperties.getVersion()));
}
}
`
Expected behavior
- A clear and concise description of what you expected to happen.
- What is the expected result using OpenAPI Description (yml or json)?
Expected from SwaggerHub : 
Actual from SpringDoc-ui : 
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Describe the bug
When written in SwaggerHub, adding "securitySchemes" automatically enable "Authorize" button for user to get access token. However, Springdoc does not show such button.
To Reproduce
Steps to reproduce the behavior:
Below is code that I use.
`
@bean
public SecurityScheme oauth() {
}
@bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.components(new Components())
.info(
new Info()
.title("Message service")
.description("This documents message-service API")
.version(buildProperties.getVersion()));
}
}
`
Expected behavior
Expected from SwaggerHub :
Actual from SpringDoc-ui :
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.