From 41a421b895a0648a04215cc0195efa7988108fac Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Tue, 9 Apr 2024 19:24:23 +0200 Subject: [PATCH] fix --- progenitor-impl/src/cli.rs | 3 ++- progenitor-impl/src/httpmock.rs | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/progenitor-impl/src/cli.rs b/progenitor-impl/src/cli.rs index e10ceae0..c0454d49 100644 --- a/progenitor-impl/src/cli.rs +++ b/progenitor-impl/src/cli.rs @@ -470,7 +470,8 @@ impl Generator { // are currently... OperationParameterType::RawBody => None, - OperationParameterType::Type(body_type_id) => { + OperationParameterType::Type(body_type_id) + | OperationParameterType::Form(body_type_id) => { Some(body_type_id) } }); diff --git a/progenitor-impl/src/httpmock.rs b/progenitor-impl/src/httpmock.rs index 1d1f19ec..8904e745 100644 --- a/progenitor-impl/src/httpmock.rs +++ b/progenitor-impl/src/httpmock.rs @@ -164,7 +164,8 @@ impl Generator { name, typ, kind, .. }| { let arg_type_name = match typ { - OperationParameterType::Type(arg_type_id) => self + OperationParameterType::Type(arg_type_id) + | OperationParameterType::Form(arg_type_id) => self .type_space .get_type(arg_type_id) .unwrap() @@ -245,9 +246,9 @@ impl Generator { OperationParameterKind::Header(_) => quote! { todo!() }, OperationParameterKind::Body(body_content_type) => { match typ { - OperationParameterType::Type(_) => quote! { + OperationParameterType::Type(_) + | OperationParameterType::Form(_) => quote! { Self(self.0.json_body_obj(value)) - }, OperationParameterType::RawBody => { match body_content_type {