'HTTP not present on Schemes Swagger dropdown
I'm using springfox-swagger-ui and for whatever reason, only https scheme is available on the dropdown, even if I reach swagger ui through http. I can't use https for the moment, so need that scheme enabled but couldn't find anything on the documentation. Any idea why is this happening?
Solution 1:[1]
Add these following lines to your yaml page:
schemes:
- "https"
- "http"
Solution 2:[2]
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2).select()
.apis(RequestHandlerSelectors.basePackage("base.package"))
.paths(PathSelectors.any())
.build()`enter code here`
.protocols(new HashSet<>(Arrays.asList("http", "https")));
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AkSh |
| Solution 2 | Gaboo |
