Skip to content
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

[Java][Feign] Add support for Feign 10 (#977) #988

Merged

Conversation

ihrankouski
Copy link
Contributor

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.3.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

@bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01)

Description of the PR

Fixes #977

@cbornet
Copy link
Member

cbornet commented Sep 6, 2018

Can't we just upgrade to feign 10 and not add an option ? From what I see there is no change to the API from a user perspective so it stays backward compatible.

@ihrankouski
Copy link
Contributor Author

@cbornet there's a breaking change in 10: constructor of feing.RetryableException now requires HTTP method as argument.

@cbornet
Copy link
Member

cbornet commented Sep 6, 2018

Yes but it's not visible to the SDK user

@jmini
Copy link
Member

jmini commented Sep 8, 2018

Can't we just upgrade to feign 10 and not add an option ?

Well @wing328 suggested to do it with an option #977 (comment)


I think we have no clear rule, when we can just update the library used by the generated code, or when we need to do it with switches

In general, each time we support both versions of a lib with a switch, everything gets more completed (the templates, the testing effort, the options list that the user can set).

I do not know this specific library, but I would tend to think that if the 9.x stream of Feign is no longer supported, we can update without supporting an old version in the generator.

The other point explained by @cbornet is absolutely correct:
if someone who has generated code with OpenAPI-Generator 3.2.3 (relying on 9.4 of Feign) has nothing to change in its code (built on top of the generated code) when he switches to a new version of OpenAPI-Generator (relying on Feign 10.0.1) then the need for a flag is really small.

@wing328
Copy link
Member

wing328 commented Sep 8, 2018

Right. That's my suggestion. https://github.com/OpenFeign/feign/releases/tag/release-10.0.0 was released less than a month ago so I think a majority of the users are still using the Feign 9.x.

Given that Feign 10.x no longer supports JDK 7 if I understand it correctly, I prefer to have an option to keep JDK 7 users happy

@cbornet
Copy link
Member

cbornet commented Sep 8, 2018

Then maybe keep v9 only for JDK7 ?

@wing328
Copy link
Member

wing328 commented Sep 8, 2018

Then maybe keep v9 only for JDK7 ?

Yup, the current approach still uses v9 by default. When more users have switched to v10, we will change the default to use v10.

@wing328 wing328 merged commit aa29219 into OpenAPITools:master Sep 9, 2018
@wing328
Copy link
Member

wing328 commented Sep 9, 2018

@ihrankouski thanks for the contribution, which has been merged into master.

@wing328 wing328 mentioned this pull request Sep 10, 2018
4 tasks
jaumard pushed a commit to jaumard/openapi-generator that referenced this pull request Sep 21, 2018
@wing328
Copy link
Member

wing328 commented Oct 2, 2018

@ihrankouski thanks again for the PR, which is included in the v3.3.0 minor release: https://twitter.com/oas_generator/status/1046941449609068544

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants