-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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][Spring] Different in-parameter types generated for api and delegate for binary (application/octet-stream) #9331
Conversation
…es generated for api and delegate for files
I am waiting for this merge too. Hope you would do it quite fast :). Thanks in advance. |
Tested locally and the result is good. |
That'a a breaking change in a fix-version. I have to change my code from Resource to MultipartFile and then it doesn't even work anymore because application/octet-stream is not considered by spring's multipart resolver. So the parameter is null at run time. |
Even more, it breaks the ability to return binary content. See #9462 |
…eter types generated for api and delegate for files (OpenAPITools#9331)" This reverts commit b9a1c8f.
…eter types generated for api and delegate for files (OpenAPITools#9331)" (OpenAPITools#9555) This reverts commit b9a1c8f.
Related to #8659
Actual api endpoint is using
org.springframework.core.io.Resource
but delegatee is usingorg.springframework.web.multipart.MultipartFile
Now both are using the second one, which is recommended by Spring (according to my latest knowledge)
Tests are passing and also generation of the following endpoint works (it does not work on plain 5.1.0)
@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @nmuesch
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.
master
,5.1.x
,6.0.x