Configuration not applied after upgrading to 1.5.7
See original GitHub issueHello,
I’m using jersey-core 1.5.5 and I need to upgrade to >= 1.5.7 in order to fix ObjectMapper issue #1604 (my JSON date formatting is incorrect).
It works fine but now I have a problem with the swagger.json, my configuration is not applied :
{"swagger":"2.0","info":{"version":"Swagger Server","title":""},"tags": ...
The rest of the document is correct, I can use it in Swagger-UI but I can’t call my API because host / basePath are not set in the document. My configuration is defined like in this post (to define contextPath as basePath) : http://stackoverflow.com/a/35905415/1001248
I’m using swagger-jersey-jaxrs in a Glassfish 3.1.2.2 environnement.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
org.springframework.boot Configuration with name 'runtime ...
Failed to apply plugin 'org.springframework.boot' Configuration with name 'runtime' not found. The following is my build.gradle
Read more >Questions on 1.5.7 upgrade - Zen Cart Support
2) When upgrading from an older version of Zen to 1.5.7 it states to copy your existing files into the test directory (done...
Read more >Upgrading your build from Gradle 6.x to the latest
Run gradle wrapper --gradle-version 7.0 to update the project to 7.0. Try to run the project and debug any errors using the Troubleshooting...
Read more >K84554955: Overview of BIG-IP system software upgrades
Using the Configuration utility, you can change the import options by going to System > Software Management > Boot Locations > <boot location ......
Read more >Release Notes for Cisco UCS C-Series Software, Release 1.5(7)
Do not upgrade individual components (only BIOS or only CIMC), since this could lead to unexpected behavior. If you choose to upgrade BIOS ......
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

I understand.
I pushed a sample maven project to reproduce the issue : https://github.com/fdelsert/swagger-issue-1886
I excluded Jersey dependencies 1.13 of swagger-jersey-jaxrs because I use Jersey 1.11 provided by Glassfish server. Maybe the problem comes from an incompatibility with the Jersey version.
Direct links :
OK, the
BeanConfigis used for programmatic configuration without needing web.xml. The web.xml configuration will not trigger scanning in BeanConfig. So you have two choices:Use web.xml through the
DefaultJaxrsConfig. You don’t need to subclass it, and doing so the way you did isn’t going to work. Use the fields that are supported in that class, including host and basepath.Use a programmatic configuration. You can follow a pattern like this:
https://github.com/swagger-api/swagger-samples/tree/master/java/java-jaxrs
Where a web.xml configures most of the application, and a custom servlet does the rest.