Open appaquet opened 4 years ago
Thanks for the report. You're correct about the location in the generator that needed to be fixed. https://github.com/google-apis-rs/generator/commit/9ad1f063e5046f2f404ea77f0116e0fd25b4246d should have the fix. @mwilliammyers Would you mind regenerating the bindings whenever you get a chance?
I tried generating it again but ran into some issues, so I will try again later when I have more time to fix the issues.
Hey guys! Any progress on this?
@doivosevic Sorry for the late response, I updated them all in google-apis-rs/generated@318cd3b1. All of the libs build, but many of the CLI bins do not.
Hi,
When trying to use a rest api method's param that supports repeated values (i.e.
Vec<T>
), it fails at runtime asreqwest
expects repeated fields to be passed in a&[(param, value1), (param, value2)]
format instead of&[(param, values)]
format (see reqwest's request.rs).Example: In Gmail's list threads request, for parameter
label_ids
of typeVec<String>
, it is passed as-is toreqwest
query: https://github.com/google-apis-rs/generated/blob/master/gen/gmail/v1/lib/src/lib.rs#L8537I tried to dig down on how the generator generates the method. As I understand it, it would need to remap repeated parameters to
reqwest
expected format in here: https://github.com/google-apis-rs/generator/blob/a848301466556f16d48df64ef16b92a8327a8406/google_rest_api_generator/src/method_builder.rs#L368Let me know if you need more info. I'm willing to take a stab at it if you can describe how you envision the fix.
Thanks !