[Spring] fix datatype for non-multipart file request body#2271
Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom Mar 7, 2019
Merged
Conversation
|
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
8f1e6a3 to
0a86bad
Compare
0a86bad to
b3fabd7
Compare
wing328
approved these changes
Mar 7, 2019
Member
wing328
left a comment
There was a problem hiding this comment.
Tested locally and didn't notice any issue.
6 tasks
jimschubert
added a commit
to jimschubert/openapi-generator
that referenced
this pull request
Mar 9, 2019
* master: (758 commits) Add support for free form requests (OpenAPITools#2288) [typescript-rxjs] drop unneeded function wrapping (OpenAPITools#2332) [typescript-fetch] Guard array mapping against undefined on optional array model properties (OpenAPITools#2324) Fix regex in Python server model code (OpenAPITools#2314) Add .travis.yml and Gemfile.lock to ruby security test folder (OpenAPITools#2330) Add a link to CSDN article (OpenAPITools#2331) [Maven] fix Spaces in Windows user path breaks build on test goal (OpenAPITools#2318) [PHP] fix bad links in Model docs (OpenAPITools#2316) [java]: fix datatype for non-multipart file request body (OpenAPITools#2271) Removed JFCote from core team (OpenAPITools#2315) [R sample] fix CircleCI error of outdated sample (OpenAPITools#2313) [Java] Bean Validation for decimalmin/max incorrect when exclusive set (OpenAPITools#2115) Java Spring : fix defaultValue annotation double quoted in api operation (OpenAPITools#2267) Java RESTEASY : fix defaultValue annotation double quoted in api operation (OpenAPITools#2268) [PHP] Username checks OpenAPITools#1408 (OpenAPITools#1892) [typescript-fetch] remove namespaces in enums (OpenAPITools#2123) [java-server-msf4j] fix and upgrade (OpenAPITools#2303) fix test script path in CONTRIBUTING.md (OpenAPITools#2290) Dart queryargs (OpenAPITools#2250) add Blueplanet language (OpenAPITools#2184) ...
6 tasks
|
We still see this issue for the generated Api and ApiDelegate files, they have different request body types (Resource/MultipartFile), which is resulting in compilation errors. opened a new issue at #3905 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #2191
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.sh,./bin/security/{LANG}-petstore.shand./bin/openapi3/security/{LANG}-petstore.shif 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\.master,. Default:3.4.x,4.0.xmaster.Description of the PR
The distinction between the following cases was leading to compile errors in the generated code
adressing request body as single file:
and files in multipart/form-data requests:
(as described here
I found out, that internally multipart parameters are handled in formParams, where the "raw" body is handled in bodyParams.
In the template for formParams is a special case for files in multipart, that was also used for rendering the delegate methods signature.
But request bodies as single file were ignored in that case.
I added the distinction in the template part for the delegate methods signature.
I invoked the sample generation scripts, they did not change any files.
@bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01)