From 0b845a57e46c7624cb778ff3ef23e833394b2aca Mon Sep 17 00:00:00 2001 From: Aykut Akin Date: Sat, 10 Feb 2018 15:27:44 +0100 Subject: [PATCH] [Rust] Changes hard coded body to dynamic parameter name - Fixes #6569 (#7630) --- modules/swagger-codegen/src/main/resources/rust/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/rust/api.mustache b/modules/swagger-codegen/src/main/resources/rust/api.mustache index 14da83f68e..21c45ef38d 100644 --- a/modules/swagger-codegen/src/main/resources/rust/api.mustache +++ b/modules/swagger-codegen/src/main/resources/rust/api.mustache @@ -75,7 +75,7 @@ impl{{classname}} for {{classname}}Client { {{#hasBodyParam}} {{#bodyParams}} - let serialized = serde_json::to_string(&body).unwrap(); + let serialized = serde_json::to_string(&{{paramName}}).unwrap(); req.headers_mut().set(hyper::header::ContentType::json()); req.headers_mut().set(hyper::header::ContentLength(serialized.len() as u64)); req.set_body(serialized);