-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Springfox swagger-ui.html not loading using version 3.0.0-SNAPSHOT #3362
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
Comments
Duplicat #3360 |
I must admit to being very confused. It seems that there are now multiple releases of 3.0.0-SNAPSHOT version - my .m2 repository has multiple 3.0.0-SNAPSHOT jars, one on 8th May, one on 5th July and one from earlier this morning. All I know is that my OpenAPI docs are now screwed and swagger-ui.html no longer works. I use Google Cloud Endpoints and this now rejects the OpenAPI v2 config doc which differs significantly from an earlier, working version and which is clearly 'odd'. I only switched to 3.0.0-SNAPSHOT because of its support for Spring WebFlux but it is clear that, at the moment, it is simply unusable for me. What is the plan for 3.0.0-SNAPSHOT? Should I switch to 2.10.5 but does that support Spring WebFlux. Sorry, not wanting to sound critical as it is a great product and it is clear to see the effort put it, but I am completely exasperated and wondering how to proceed. Any hints would be greatly appreciated. |
@andrew-property-xyz again apologies as things are in a bit of a flux (as expected with snapshots) as I work on getting 3.0.0 released this week. I suspect there is a couple of things going on here. If you're unable to share a repo that demonstrates the problem, would you look at the the demos project especially the |
@dilipkrish one doubt, what is the extra features are there in snapshot 3.0.0 that everyone is following the repo in dependency repo compared to 2.10.5 stable. For me, I just copied the version from a blog. |
3.0.0 is the latest released version. Please see the release notes for details. 2.10.5 is an intermediate release and not meant for public consumption. |
I use 3.0.0 and find the new swagger ui is http://xxxx:port/swagger-ui/ ( please remember the last splash). |
Hi @fishjam @dilipkrish |
@pushkaraj20885 you need to allow access to the resources if you have authentication turned on |
Hi @dilipkrish
but still getting same error |
Please look at @fishjam post. To make it work .../swagger-ui/ NOT .html. That need to be fixed |
In spring boot it works by simply adding this, no other dependencies needed: |
Thank you . It worked for me by adding the io.springfox springfox-boot-starter 3.0.0 and with the url http://localhost:8080/swagger-ui/ |
Hi Guys, I have to admit, the Swagger project is one of the most confusing library. I finally managed to get this working with springfox-boot-starter 3.0.0 My config: gradle: group = 'com.curvecue' configurations { repositories { ext { //configurations { dependencies {
// implementation 'org.springframework.boot:spring-boot-starter-undertow'
} dependencyManagement { test { @configuration Sample RestController
} And now most importantly the url: Hope this helps. I didn't have to make any Spring Security adjustments. |
new url is |
@kuchaguangjie Thank you so much. I spent an hour trying every possible approach only to figure out that I was missing a '/' at the end of the url. |
Hello, I added this dependency to pom.xml (this is the only dependency pointing to sprinfox) and still getting error while accessing |
Thank you, finally works for me!!! |
While using the following dependencies, only
However, if you add the below dependency instead of the above one, both are working well
|
Incredible how a library is too confused! This works: Something missing? |
No solution worked for me yet |
This worked for swagger version 3.0.0 |
After spending several hours I found out in my case spring cloud config server caused the problem, see this and this. Since path conflict was the main reason of the problem, it's possible to happen in any other cases where path conflict exists, for example when base path of a rest service is |
We are not using springboot application and but they are trying to update the swagger from 2.9.2 to 3.0.0 version and we are facing swagger.html issue 404. Could you please help on this to work? |
currently i am using springfox 3.0.0 with spring-boot 2.7.1 version. below link solutions doesn't work for me. while using swagger-ui urls. |
Have you manage to sort this? |
add **swagger-ui/ path (springfox) Source: springfox/springfox#3362 (comment)
In our project we are using 3.0.0-SNAPSHOT of swagger springfox.
Recently when we open swagger-ui.html, it is giving 404 Whilte Label Error.
I enabled logs at web level
`
`
It is loading "/swagger-resources", but not loading "/swagger-ui.html"
The addition of the resource handler is as per the document.
When loading "/swagger-ui.html", it's giving "Resource not found"
`
`
I checked if path inside META-INF is changed or not as per documentation at https://springfox.github.io/springfox/docs/snapshot/#snapshot-3, it is same as V 2.10.5
Then, when I changed version from V 3 Snapshot to current stable 2.10.5, it worked.
Can you let me know what I am missing? And since I am a noobie, can you tell me is snapshot version is like beta version which should not be used in production?
The text was updated successfully, but these errors were encountered: