-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Q&A (please complete the following information)
- OS: Windows 11
- Browser: Chrome
- Version: 138.0.7204.184
- Method of installation: included as a dependency to Springdoc
- Swagger-UI version: 5.21.0
- Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0
Content & configuration
The "../doc" link on the Swagger-UI page leads to "http:/server:port/app-index/api/swagger-ui/doc" instead of "http:/server:port/app-index/api/doc".
Swagger/OpenAPI definition:
springdoc.api-docs.path=/api/doc
springdoc.override-with-generic-response=false
springdoc.auto-tag-classes=false
springdoc.paths-to-match=/api/**
springdoc.use-fqn=true
springdoc.api-docs.version=OPENAPI_3_0
Swagger-UI configuration options:
springdoc.swagger-ui.path=/api/swagger-ui.html
springdoc.swagger-ui.configUrl=../doc/swagger-config
springdoc.swagger-ui.url=../doc
springdoc.swagger-ui.disable-swagger-default-url=true
springdoc.swagger-ui.filter=true
springdoc.swagger-ui.layout=BaseLayout
springdoc.swagger-ui.operationsSorter=alpha
springdoc.swagger-ui.validatorUrl=
springdoc.swagger-ui.displayOperationId=
springdoc.swagger-ui.deepLinking=true
springdoc.swagger-ui.defaultModelExpandDepth=5
springdoc.swagger-ui.defaultModelsExpandDepth=-1
springdoc.swagger-ui.docExpansion=none
springdoc.swagger-ui.use-root-path=false
Screenshots
Current state:

Expected (old) state.

How can we help?
Hi!
So my issue is that I've upgraded springdoc-openapi-starter-webmvc-ui to the latest stable version as of the time of writing this text (v2.8.9). This pulls in the swagger-ui v5.21.0 as a dependency, which results in the (above) described behavior. I've mitigated this by overriding the swagger-ui dependency to a version < 5.20.0. However, the new behavior would prevent me from ever moving to newer versions of swagger-ui.
Do you have any advice for a more permanent fix, or would you be able to add a "switch" that would regulate url sanitization behavior?
Best regards