Customizing swagger static resources with Springdoc

972 views Asked by At

According to the documentation (see the link below) the static resources can be customized with Java by extending SwaggerIndexPageTransformer and overriding the transform method.

https://springdoc.org/#customizing-swagger-static-resources

As I understand the following files could be customized:

index.html

swagger-ui-bundle.js

swagger-ui.css

swagger-ui-standalone-preset.js

swagger-ui.css.map

swagger-ui-bundle.js.map

swagger-ui-standalone-preset.js.map

favicon-32x32.png

According to the example code I can check the name of the resource like:

if (resource.toString().contains("swagger-ui.css")) {
...

My problem is the only resource handled by this method is "META-INF/resources/webjars/swagger-ui/4.10.3/index.html"

Anybody had the same issue or do I misunderstand something?

1

There are 1 answers

0
krillov On BEST ANSWER

I upgraded Spring to 2.7.0 and the issue disappeared.