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
Unable to infer base url... springfox-swagger2 version 2.9.2 #3001
Comments
there seems to be a bug that when the front end spring fox gui is trying to fetch it's configuration from the back end that if you don't explicitly set the path mapping to a value the configuration url for the front end will be built with a null value. The error handling for this scenario seems poor, so that if the front end can\t find it, it will just go in an endless loop in the background hogging resources/threads. i solved this by setting the path mapping:
i didn't manage to exactly debug the code to where this is happening, but the bug still exists and no one has confirmed it for me. As the springfox project seems very dormant. |
Thanks @Tandolf !! :) Now, the path mapping does not contain anything, like |
Now, I managed to solve my issue. I needed to change my configuration to explicitly to "/", like here
Other issue was I used
If I commented out my response wrapper class, everything works like a charm..... The only issue, that I need my response wrapper. :/ |
Can anyone help me on this issue... it's been days im stuck on it. Getting /null on all context paths |
I had this issue and the above pathmapping worked for me. Also before this I came across some more advice to remove @EnableMvc annotation from my web config and voila /swagger-ui.html works. |
thank you very much, i have trouble with this. because of your answer, i remove my ResponseBodyAdvice, and it run successfully |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue still persists. |
This issue is fixed in 3.0.0 which will be released shortly. Also please note changes coming in the next release as regards swagger-ui #3360 |
Closing this as a duplicate of #3360 |
What kind of issue is this?
Project structure:
SwaggerConfig is in
automate.api.config.swagger.SwaggerConfiguration
Auth Config is in
automate.api.web.auth.keycloak.FalconKeycloakConfigurerAdapter
dependencies
As for Spring Boot
As for swagger
Swagger 2 config
Security config
Example for one of my controllers
All of my controllers mapped like
/api/...
ISSUE
/v2/api-docs
works perfectly, I get back all of my endpoints with their details/swagger-ui.html
gives me back a pop up that shows "Unable to infer base url......"Then I turned on the TRACE log level on my spring-boot app, like
My logs looks like:
Please, help me ! :)
The text was updated successfully, but these errors were encountered: