-
-
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
[dart][dart-dio-next] Improve support for file uploads #9542
Conversation
* add support for filenames in multipart requests by using `MultipartFile` from dio directly * add support for binary/file body data * fixes OpenAPITools#6671 * fixes OpenAPITools#9079
...api-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java
Outdated
Show resolved
Hide resolved
36f5260
to
a3519b9
Compare
Finally, very much needed. |
...api-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java
Show resolved
Hide resolved
samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/PetApi.md
Show resolved
Hide resolved
@@ -36,7 +36,7 @@ void main() { | |||
'int64': '9223372036854775807', | |||
'date': '2020-08-11', | |||
'dateTime': '2020-08-11T12:30:55.123Z', | |||
'binary': "Instance of 'MultipartFile'", | |||
'binary': '[0, 1, 2, 3, 4, 5]', |
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.
Not sure this makes sense to send over the wire like this, but better than before in any case.
@kuhnroyal please resolve the merge conflicts when you've time. Thanks. |
CI failure not related to this change. |
…9542) * [dart][dart-dio] Improve support for file uploads * add support for filenames in multipart requests by using `MultipartFile` from dio directly * add support for binary/file body data * fixes OpenAPITools#6671 * fixes OpenAPITools#9079 * Add and fix tests * Only use MultipartFile for body/multipart parameters * Fix test * Actually fix tests
I am currently using 5.2.0, but I found that the change to support MultipartFile does not seem to take effect at all. I checked the generated template and found that there was no change at all!!! |
dart-dio-next |
This should work with |
MultipartFile
from dio directly@jaumard @ayushin This should fix your linked issues.
PR checklist
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
CC @swipesight (2018/09) @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12)