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

Fix multi-part binary form parameters for jaxrs-jersey templates #7363

Merged
merged 5 commits into from
Oct 25, 2020

Conversation

itaru2622
Copy link
Contributor

Multi-part binary array form as outlined in #7330 resulted in a single of InputStream and a single of FormDataContentDisposition rather than List of them. This PR attempts to resolv above by adjusting the templates for jaxrs-jersey. Changes to these templates include:

Fix #7330

technical committee: @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@itaru2622 itaru2622 force-pushed the multipartFiles-jaxrs-jersey branch 2 times, most recently from daa0177 to 13e090b Compare September 8, 2020 20:15
@itaru2622 itaru2622 changed the title Fix multi-part binary form parameters for jaxrs-jersey templates Fix [BUG] multi-part binary form parameters for jaxrs-jersey templates Sep 10, 2020
@itaru2622
Copy link
Contributor Author

CI all tests passed.

@wing328 Could you review this PR, please.

@itaru2622
Copy link
Contributor Author

itaru2622 commented Sep 23, 2020

PR branch is rebased on latest master as of 'Sep 23 02:45:29 2020', and resolved confliction in
modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJerseyServerCodegenTest.java

@itaru2622
Copy link
Contributor Author

itaru2622 commented Oct 9, 2020

PR branch is rebased on latest master as of 'Oct 14 10:13:17 2020 +0800'.

To technical committee and maintainers:

Please let me know your estimation when this PR is reviewed and merged into master?
It is hard to keep rebasing my branch for following master changes...

@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda @wing328 @jimschubert and all

@itaru2622 itaru2622 force-pushed the multipartFiles-jaxrs-jersey branch 3 times, most recently from e578593 to 23654e9 Compare October 13, 2020 03:16
@wing328 wing328 added this to the 5.0.0 milestone Oct 25, 2020
@wing328 wing328 changed the title Fix [BUG] multi-part binary form parameters for jaxrs-jersey templates Fix multi-part binary form parameters for jaxrs-jersey templates Oct 25, 2020
@wing328 wing328 merged commit 3c62cc4 into OpenAPITools:master Oct 25, 2020
@wing328
Copy link
Member

wing328 commented Oct 25, 2020

@itaru2622 thanks for the PR, which has been merged into master but it's causing build failures.

I've commented out the test via 07c23f4. I wonder if you can pull the latest master to take a look when you've time. Thanks.

@itaru2622
Copy link
Contributor Author

@wing328 first, Thank you for merging.

  • latest master has no 'List' in the above test case at this moment, so you needed 07c23f4 to build successfully .

  • my PR branch can build successfully without 07c23f4, and it has 'List' in case of "multipartArray" at test/resources/3_0/form-multipart-binary-array.yaml.

hmm... I will check some-how with latest master.

@itaru2622
Copy link
Contributor Author

@wing328 I found the reason as bellow, and after little modification including revert 07c23f4, It succeeded building again. ;-)

  • latest master uses 'isArray' instead of 'isListContainer' in mustache, but my PR branch was using 'isListContainer'.
  • I guessed, mustache rule was changed from 'isListContainer' to 'isArray' recently ...

my little modification is:

Let me know what should I do next.

The above description is enough for you? or ...
Is it better to push my change into my PR branch with or without reverting 07c23f4 ?
Do I need to run ./bin/generate-samples.sh before push?

I'm looking forward hearing from you... ;-)

@wing328
Copy link
Member

wing328 commented Oct 26, 2020

@itaru2622 ah right. Forgot about the isArray change (I thought the PR hasn't merged yet).

I've filed #7806 to fix the issue. CI tests look good so far.

@itaru2622
Copy link
Contributor Author

@wing328 Thank you for #7806.

I confirmed it passed all CI test. please merge #7806 to master... or Is there any task remained yet?

@itaru2622 itaru2622 deleted the multipartFiles-jaxrs-jersey branch December 1, 2020 13:38
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.

[BUG] [jaxrs-jersey] [java] [jersey] Generated API interface treats multipart arrays as a single file
2 participants