/swagger-ui/index.html won't render for secondary application on same path
Describe the bug I see an issue where when I try and open Swagger that has the same url path as another application, it won't open for whatever application ran second(I'm only running 1 application at a time)
I'm trying to transition from SpringFox to SpringDoc (all this is done and the swagger pages function as intended). Just rendering for each subsequent applications will not work.
I'm using:
- org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.13
- Latest Spring Boot 3.5.7
- Latest Spring Framework 6.2.12
- Using Java 21
To Reproduce Create 2 applications that both use swagger and setup with same configuration. Perhaps utilize different controllers/endpoints though.
- Run 1 application and access the swagger page (/swagger-ui/index.html)
- Note that application 1 will render properly
- Turn off the first application
- Run the second application and access the swagger page (/swagger-ui/index.html)
- Note that application 2 WILL NOT OPEN SWAGGER
- Try application 2 within private browser will work though
- Clearing cookies will allow either application to render
My application.yml config:
springdoc:
swagger-ui:
doc-expansion: none
defaultModelExpandDepth: 0
syntax-highlight:
activated: false
If a video is necessary, I could do this.
Expected behavior It's expected that running multiple applications (not at the same time) will still allow connecting to the swagger page. I'm providing an example with 2 applications, but the system I work on has close to 100 swagger pages. Since all of these will be deployed on separate IP addresses, it won't be a concern there for testing in lower-life cycles. But when it comes to testing stuff locally, it'll become a nightmare.
Screenshots
@DavidClifford-Pro,
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.