@@ -404,18 +404,44 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
404404 { {^supportAsync} }
405405 { {#required} }
406406 { {^isNullable} }
407+ { {#isArray} }
408+ for value in & { {{vendorExtensions.x-rust-param-identifier} }} {
409+ multipart_form = multipart_form.file(" {{{baseName}}}" , value)?;
410+ }
411+ { {/isArray} }
412+ { {^isArray} }
407413 multipart_form = multipart_form.file("{ {{baseName} }}", { {{vendorExtensions.x-rust-param-identifier} }})?;
414+ { {/isArray} }
408415 { {/isNullable} }
409416 { {#isNullable} }
417+ { {#isArray} }
418+ match { {{vendorExtensions.x-rust-param-identifier} }} {
419+ Some(param_value) => {
420+ for value in param_value {
421+ multipart_form = multipart_form.file(" {{{baseName}}}" , value)?;
422+ }
423+ },
424+ None => { unimplemented! (" Required nullable form file param not supported" ); } ,
425+ }
426+ { {/isArray} }
427+ { {^isArray} }
410428 match { {{vendorExtensions.x-rust-param-identifier} }} {
411429 Some(param_value) => { multipart_form = multipart_form.file(" {{{baseName}}}" , param_value)?; } ,
412430 None => { unimplemented! (" Required nullable form file param not supported" ); } ,
413431 }
432+ { {/isArray} }
414433 { {/isNullable} }
415434 { {/required} }
416435 { {^required} }
417436 if let Some(ref param_value) = { {{vendorExtensions.x-rust-param-identifier} }} {
437+ {{#isArray} }
438+ for value in param_value {
439+ multipart_form = multipart_form.file(" {{{baseName}}}" , value)?;
440+ }
441+ { {/isArray} }
442+ { {^isArray} }
418443 multipart_form = multipart_form.file("{ {{baseName} }}", param_value)?;
444+ { {/isArray} }
419445 }
420446 { {/required} }
421447 { {/supportAsync} }
@@ -451,7 +477,7 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:
451477 }
452478 { {/isArray} }
453479 { {^isArray} }
454- let file = TokioFile::open({ {{vendorExtensions.x-rust-param-identifier} }}).await?;
480+ let file = TokioFile::open(& { {{vendorExtensions.x-rust-param-identifier} }}).await?;
455481 let stream = FramedRead::new(file, BytesCodec::new());
456482 let file_name = { {{vendorExtensions.x-rust-param-identifier} }}.file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_default();
457483 let file_part = reqwest::multipart::Part::stream(reqwest::Body::wrap_stream(stream)).file_name(file_name);
0 commit comments