[dart][dart-dio] Correctly type responses and futures#8195
[dart][dart-dio] Correctly type responses and futures#8195wing328 merged 1 commit intoOpenAPITools:masterfrom
Conversation
* don't rely on implicit dynamics * this is a requirement for NNBD * add space between return type and some method names
|
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
| /// | ||
| /// | ||
| Future<Response>addPet( | ||
| Future<Response<void>> addPet( |
There was a problem hiding this comment.
are you sure this is correct for adding a pet? persumably it's for POST and _dio.request has bodyData, same for updating a pet, it's void too.
Why is uploading file different than uploading object Pet?
There was a problem hiding this comment.
No response defined here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml#L42
And 200 with ApiResponse here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml#L259
There was a problem hiding this comment.
Btw this is the response, the bodyData doesn't matter.
|
Shippable CI failure not related to this change. |
Note:
http.Responseis not generically typed for dart butdio.Response<Type>is.PR checklist
./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.masterCC @swipesight (2018/09) @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12)