Skip to content

Commit fcb42c0

Browse files
committed
Fix missing ^isArray condition
1 parent d18625f commit fcb42c0

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

  • modules/openapi-generator/src/main/resources/rust/reqwest-trait
  • samples/client/petstore/rust/reqwest-trait/petstore/src/apis

modules/openapi-generator/src/main/resources/rust/reqwest-trait/api.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ impl {{classname}} for {{classname}}Client {
245245
_ => local_var_req_builder.query(&[("{{{baseName}}}", &param_value.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
246246
};
247247
{{/isArray}}
248+
{{^isArray}}
248249
{{#isDeepObject}}
249250
{{^isExplode}}
250251
let params = crate::apis::parse_deep_object("{{{baseName}}}", &serde_json::to_value(param_value)?);
@@ -276,6 +277,7 @@ impl {{classname}} for {{classname}}Client {
276277
{{/isModel}}
277278
{{/isObject}}
278279
{{/isDeepObject}}
280+
{{/isArray}}
279281
}
280282
{{/required}}
281283
{{/queryParams}}

samples/client/petstore/rust/reqwest-trait/petstore/src/apis/pet_api.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ impl PetApi for PetApiClient {
174174
"multi" => local_var_req_builder.query(&param_value.into_iter().map(|p| ("type".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
175175
_ => local_var_req_builder.query(&[("type", &param_value.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
176176
};
177-
local_var_req_builder = local_var_req_builder.query(&[("type", &param_value.to_string())]);
178177
}
179178
if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
180179
local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());

0 commit comments

Comments
 (0)