You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using org.springdoc:springdoc-openapi-starter-webmvc-ui and org.springdoc:springdoc-openapi-starter-common in the project sw360 to document the REST API with OpenAPI docs. I added the webmvc-ui as documented to get the Swagger UI working.
It was working fine until we upgraded to v2.8.4 and ever since the swagger UI stopped working.
However, even with old version and new version, I can keep getting the OpenAPI doc via /v3/api-docs endpoint without any issue.
The response for /swagger-ui/index.html always return multipart/byterange with 206 status:
Upon further debugging, I noticed inside org.springframework.web.seervlet.resource.ResourceHttpRequestHandler.handleRequest(), the response still gets the correct HTML resource from org.springframework:spring-webmvc but there is now a header called Range which causes the handleRequest() to return the multipart/byteranges.
I added a filter to check if my request contains swagger-ui then override the getHeader() and return null if header name is Range and everything starts working normal.
I need some help from the community to understand what went wrong as there is no other configuration or filter changes done in between the version upgrades. I want to get rid of this filter and have a simple solution.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?: 3.3.3
What modules and versions of springdoc-openapi are you using? springdoc-openapi-starter-common and springdoc-openapi-starter-webmvc-ui version 2.8.5
What is the actual and the expected result using OpenAPI Description (yml or json)? any
Additional context application.yml for the resource server:
Describe the bug
I am using
org.springdoc:springdoc-openapi-starter-webmvc-ui
andorg.springdoc:springdoc-openapi-starter-common
in the project sw360 to document the REST API with OpenAPI docs. I added thewebmvc-ui
as documented to get the Swagger UI working.It was working fine until we upgraded to v2.8.4 and ever since the swagger UI stopped working.
However, even with old version and new version, I can keep getting the OpenAPI doc via
/v3/api-docs
endpoint without any issue.The response for
/swagger-ui/index.html
always returnmultipart/byterange
with206
status:Upon further debugging, I noticed inside
org.springframework.web.seervlet.resource.ResourceHttpRequestHandler.handleRequest()
, the response still gets the correct HTML resource fromorg.springframework:spring-webmvc
but there is now a header calledRange
which causes thehandleRequest()
to return themultipart/byteranges
.I added a filter to check if my request contains
swagger-ui
then override thegetHeader()
and returnnull
if header name isRange
and everything starts working normal.I need some help from the community to understand what went wrong as there is no other configuration or filter changes done in between the version upgrades. I want to get rid of this filter and have a simple solution.
To Reproduce
Steps to reproduce the behavior:
3.3.3
springdoc-openapi-starter-common
andspringdoc-openapi-starter-webmvc-ui
version2.8.5
Additional context
application.yml
for the resource server:The resource server class:
The text was updated successfully, but these errors were encountered: