Closed
Description
Describe the bug
In Spring Gateway application we import OpenAPI specs from multiple downstream services. Our configuration is like this:
We add multiple groups to SwaggerUiConfigParameters and then have Spring Gateway routes defined for external OpenAPI spec locations. Setting springdoc.swagger-ui.supportedSubmitMethods to empty array in Gateway application does not disable 'Try it out' button. However springdoc.swagger-ui.try-it-out-enabled seems to work fine for enabling Try out by default.
To Reproduce
- Create Spring Gateway application with springdoc-openapi-starter-webflux-ui:2.6.0 dependency.
- In Spring's configuration class have for Springdoc
@PostConstruct
public void apis() {
swaggerUiConfigParameters.addGroup("firstservice", "First Service");
}
and for Gateway
@Bean
public RouteLocator routes(RouteLocatorBuilder builder) {
return builder
.routes()
.route("First service Open Api", ps -> ps
.path("/v3/api-docs/firstservice")
.filters(gatewayFilterSpec -> gatewayFilterSpec.rewritePath("^.*$", "/v3/api-docs")
)
.uri("http://localhost:8082")
)
.build();
}
- Have one other applications that have Open API specs available at /v3/api-docs running at host localhost:8082
- What version of spring-boot you are using?
3.3.4 - What modules and versions of springdoc-openapi are you using?
springdoc-openapi-starter-webflux-ui:2.6.0 - 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
Expected behavior
'Try it out' button disabled in Swagger-UI