Closed eekyrus closed 1 month ago
@eekyrus
Not reproducible. Feel free to provide a Minimal, Reproducible Example - with HelloController that reproduces the problem.
This ticket will be closed, but can be reopened if your provide the reproducible sample.
@bnasslahsen
I added reproducible examples in github repos. Is it ok? First start Microservice application: https://github.com/eekyrus/Microservice Then start Spring Gateway application: https://github.com/eekyrus/TryItOutButtonBugApplication
Try accessing Swagger UI on Gateway app via localhost:8080/swagger-ui.html. It should display Microservice's swagger with Try it out button hidden. Swagger works, but button is still enabled.
I might be using the Springdoc api incorrectly here, I am not sure. My goal is to display external SwaggerUrls in Gateway application AND apply some modifications to external OpenAPI specs used, e.g. disabling Try it out buttons, removing Servers dropdown etc. Seems the various Springdoc customizers will not work for this. But I expected at least Swagger properties to work.
Could you suggest an approach for my use case? Maybe download external OpenAPI specs as json and modify them in Gateway application manually?
@eekyrus,
Your samples do not show any bugs! Remember, contributions to this repository should follow its contributing guidelines, security policy, and code of conduct.
For how to use the gateway with services, see the following demos samples:
Well it shows Try it out button being displayed when accessing localhost:8080/swagger-ui.html, even though springdoc.swagger-ui.supportedSubmitMethods= is present in application.properties. Not sure what else is missing?
it's a duplicate of https://github.com/springdoc/springdoc-openapi/issues/2740, which is fixed in the main branch
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 1) Create Spring Gateway application with springdoc-openapi-starter-webflux-ui:2.6.0 dependency. 2) In Spring's configuration class have for Springdoc
and for Gateway
3) Have one other applications that have Open API specs available at /v3/api-docs running at host localhost:8082
Expected behavior
'Try it out' button disabled in Swagger-UI