After making changes in ObjectMapper, Swagger Ui prompts "Unable to infer base url"
See original GitHub issueIn spring boot application after making these changes in objectMapper swagger stops working changes done are below:
@bean
public Jackson2ObjectMapperBuilder jacksonBuilder() {
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
builder.featuresToEnable(DeserializationFeature.UNWRAP_ROOT_VALUE);
builder.featuresToEnable(SerializationFeature.WRAP_ROOT_VALUE);
return builder;
}
If I remove these above changes swagger starts working but I need the changes, therefore can not remove. I am using version 2.8.0 of springfox-swagger2. After hitting myost:myport/mycontext/swagger-ui.html call to following endpoints is made:
{"UiConfiguration":{"apisSorter":"alpha","jsonEditor":false,"showRequestHeaders":false,"deepLinking":true,"displayOperationId":false,"defaultModelsExpandDepth":1,"defaultModelExpandDepth":1,"defaultModelRendering":"example","displayRequestDuration":false,"docExpansion":"none","filter":false,"operationsSorter":"alpha","showExtensions":false,"tagsSorter":"alpha"}}
{"SecurityConfiguration":{}}
{"List":[{"name":"default","url":"/v2/api-docs","swaggerVersion":"2.0","location":"/v2/api-docs"}]}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why does springfox-swagger2 UI tell me "Unable to infer base ...
For me the problem was that Spring Security was not allowing access to some resources needed by swagger-ui. The solution was to allow ......
Read more >[SpringFox Error] Unable to infer base url - Taogen's Blog
I want to use Swagger with Spring Boot, but the Swagger-UI can't work. Following it's my code. pom.xml. 1 2 3 4 5...
Read more >Unable to infer base url. This is common when using dynamic ...
[Solved]-Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway swagger...
Read more >Swagger UI Configuration with OKTA - Okta Support
I get a popup with the following text: Unable to infer base url. This is common when using dynamic servlet registration or when...
Read more >Table of Contents - Micronaut Documentation
The following changes and improvements were added since the last RC: ... Micronaut now includes the ability to generate Swagger (OpenAPI) YAML at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please try with a controller advice like this
This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.