-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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][jersey2] Use builder pattern for requests #4666
Conversation
Looks like it's causing issue as reported by the CI:
Does it work for you locally? |
Friendly ping, I could really use some eyes on this one 🙇 |
Bumping again, I would really appreciate some feedback on this 🙇 |
I think this looks good, and I personally prefer the builder pattern. I wonder if this will I impact existing users (consumers of generated code)? If so, should we target the 4.3.x branch? |
It should not, because I made the change behind the |
@jimschubert anything preventing the merge here ? |
No concerns from me as long as there are no breaking changes. I wonder if someone on the technical committee might have a sample app which uses this client and can verify? cc @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) |
FWIW, if we look at the generated samples, the only places where the code actually changes if for samples explicitly setting |
apiInstance.testBodyWithFileSchema(body); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zippolyte I'll see if I can get rid of these empty lines and the trailing space after try {
in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #5031
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this ! I always find it tricky to format properly with the templating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull-request OpenAPITools#4666 changed jersey generation, but didn't update the test samples Tests now succeed. on-behalf-of: @nqminds <[email protected]>
…rror) (#6679) * Add jersey2-experimental to petstore build script on-behalf-of: @nqminds <[email protected]> * [java] Add <source> to javadoc in pom.mustache We add the following <source> tag to the <configuration> of maven-javadoc-plugin for most pom.mustache files that use it. This tells javadoc which version of java the compiler used. This fixes the following error when running Java 11: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module Additionally, we also add maven-compiler-plugin to jersey2/pom.mustache to specify that the source code is Java 6/7/8. on-behalf-of: @nqminds <[email protected]> * [java-jersey2-java6] Update failing old tests Pull-request #4666 changed jersey generation, but didn't update the test samples Tests now succeed. on-behalf-of: @nqminds <[email protected]> * [java-retrofit2-play24] Fix integration-tests Running mvn integration-test failed in samples/client/petstore/java/retrofit2-play24 This merges pull requests #1735 and #5527 into retrofit2-play24. Also removes the jackson-databind-version field, since it should always be the same as jackson-version, and updates build.gradle/build.sbt on-behalf-of: @nqminds <[email protected]> Co-authored-by: Alois Klink <[email protected]>
Add support for group parameters in the jersey2 client.
It follows the pattern used in #1341, with a small adjustment: it only adds path params, and not all required parameters.
This is done in order to generate a more future proof client and prevent potential backward incompatible changes when required query parameters become optional for instance.
The reasoning for adding only path params is that a change (addition/removal of a path param) would be considered a major API contract change, and thus require a major bump of the API version, hence a major of the client as well.
Please let me know what you think.
cc @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10)
PR checklist
./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc).master
,4.3.x
,5.0.x
. Default:master
.