-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[kotlin-spring] Handle arrays of files correctly using MultipartFile #20108
[kotlin-spring] Handle arrays of files correctly using MultipartFile #20108
Conversation
…ltipart/form-data
…nstead of Spring's Resource class.
….springframework.core.io.Resource`
I'm not sure that I did the samples properly, as they seem to have switched to Windows path separators instead. |
thanks for the PR. i've filed #20117 with updated samples. is it correct to say that this is a breaking change as |
@wing328 Yeah, I guess you could consider it that. All Spring documentation says to be using MultipartFile for uploads (but we still keep Resource for downloads) |
can you please review the build failure when you've time? |
ok. i'll see if i can come up with a way to fallback in case the users prefer the current implementation. |
Sorry, I'm a bit of a noob on Github Actions. Maven build passes successfully when run, is there a way to run these tests locally? (should they be included in mvn test?) |
can you run |
There isn't any gradle wrapper in that directory EDIT: Ah I got it to run locally after some playing around. Let me fix these issues.. |
…taType.mustache. Update samples
@wing328 I made some changes but there doesn't seem to be a good way to verify all the samples compile. I feel like this should be part of the maven build |
fyi. updated samples via 2c25491 |
agreed with you that we should also test the kotlin spring project with maven as well |
cc @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
This handles request parameters of arrays of files correctly, as well as changing them to use Spring's Multipart File class, as is recommended. Previously, Spring's Resource would be used as the input and the Delegate class would not recognize the array
Fixes the following open issues for Kotlin-spring generator:
#8333
#15251
PR checklist
Commit all changed files.
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*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)