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
merged 1 commit into from Sep 9, 2018

Conversation

Projects
None yet
4 participants
@ihrankouski
Contributor

ihrankouski commented Sep 6, 2018

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

This comment has been minimized.

Show comment
Hide comment
@cbornet

cbornet Sep 6, 2018

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@ihrankouski

ihrankouski Sep 6, 2018

Contributor

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

Contributor

ihrankouski commented Sep 6, 2018

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

@cbornet

This comment has been minimized.

Show comment
Hide comment
@cbornet

cbornet Sep 6, 2018

Member

Yes but it's not visible to the SDK user

Member

cbornet commented Sep 6, 2018

Yes but it's not visible to the SDK user

@jmini

This comment has been minimized.

Show comment
Hide comment
@jmini

jmini Sep 8, 2018

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Sep 8, 2018

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@cbornet

cbornet Sep 8, 2018

Member

Then maybe keep v9 only for JDK7 ?

Member

cbornet commented Sep 8, 2018

Then maybe keep v9 only for JDK7 ?

@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Sep 8, 2018

Member

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.

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

4 checks passed

Shippable Run 2795 status is SUCCESS.
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@wing328

This comment has been minimized.

Show comment
Hide comment
@wing328

wing328 Sep 9, 2018

Member

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

Member

wing328 commented Sep 9, 2018

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

@wing328 wing328 referenced this pull request Sep 10, 2018

Merged

Add option to set Feign version #1005

4 of 4 tasks complete

jaumard added a commit to jaumard/openapi-generator that referenced this pull request Sep 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment