Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger UI with provided spec broken in 1.7.0 #2193

Closed
tobi-laa opened this issue Apr 4, 2023 · 3 comments · Fixed by #2194
Closed

Swagger UI with provided spec broken in 1.7.0 #2193

tobi-laa opened this issue Apr 4, 2023 · 3 comments · Fixed by #2194

Comments

@tobi-laa
Copy link

tobi-laa commented Apr 4, 2023

Describe the bug

Using Springdoc + Swagger UI with a provided spec as described here seems to be broken in version 1.7.0. Attempting to navigate to swagger-ui.html yields 404 Not Found.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using?
    2.7.10
  • What modules and versions of springdoc-openapi are you using?
    • springdoc-openapi-ui
    • springdoc-openapi-security

Expected behavior

The description found here should either be updated to reflect additional steps or should work again.

Additional context

The problem appears to be the newly added org.springdoc.core.SpringDocUIConfiguration, which is only loaded when property springdoc.api-docs.enabled is set to true. With the aforementioned description to use a provided spec, said property needs to be set to false.

Maybe it is possible to simply remove @ConditionalOnExpression("${springdoc.api-docs.enabled:true}") from SpringDocUIConfiguration? As an alternative, the minimal Beans configuration might be expanded to include the contents of SpringDocUIConfiguration.

@Kavan72
Copy link

Kavan72 commented Apr 5, 2023

@tobi-laa you are right, it's also broken for latest version of spring boot with version 2.1.0

@mrmacow
Copy link

mrmacow commented Apr 11, 2023

+1 for 2.1.0 getting NS_CORRUPTED_ERROR in Firefox network inspector and Swagger not rendering - 2.0.4 works perfectly. Webjar URLS give 404, and I see a commit has been made that removes a webjar locator

@blulic
Copy link

blulic commented Jul 15, 2023

Hi! Do you plan to release updated SpringDoc 1.7.x with this fix? Or we should revert to the earlier 1.6.x versions for Spring Boot 2.7.x ? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants