swagger-api / swagger-api/swagger-codegen
Swagger codegen is not compatible with feign 10.x version
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I was upgrading my application's spring boot version from 2.0.x to 2.1.x . This new version brings new version of feign (10.x). But swagger codegen maven plugin generated code is not getting compiled with with new feign version.
Further I found that swagger codegen is not generating the OAuth.java class as per 10.x version of feign and it is having compilation error.
Since Feign has changed the constructor of RetryableException class and introduced bwc, the older code is not compatible with feign's 10.x version.
Below is the new Retryable exception class:
https://github.com/OpenFeign/feign/blob/master/core/src/main/java/feign/RetryableException.java
Swagger-codegen version
3.0.8 or latest
Swagger declaration file content or url
Command line used for generation
swagger codegen maven plugin
Steps to reproduce
mvn clean install
Related issues/PRs
https://github.com/swagger-api/swagger-codegen/issues/9455
Suggest a fix/enhancement
In the above class instantiation of RetryableException should be with constructor as per 10.x version of feign.
Please let us know when this bug will be fixed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with modules/swagger-codegen/src/main/resources/Java/libraries/feign/auth/OAuth.mustache and compare its RetryableException construction with the Feign 10.x class linked in the issue. Run mvn clean install to reproduce the compilation failure. Done means generated OAuth.java compiles successfully with Feign 10.x.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100