From e0e5bdde764e5e249dd9629a66e9e72400c79d65 Mon Sep 17 00:00:00 2001 From: Alexander Popiak Date: Thu, 1 Jun 2017 18:40:32 +0200 Subject: [PATCH] fix cpprest model source mustache template (#5716) (which was generating code that doesn't compile because of a wrong variable name) --- .../src/main/resources/cpprest/model-source.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache b/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache index cee24dc406c..4856a11f5ee 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/model-source.mustache @@ -110,7 +110,7 @@ void {{classname}}::fromJson(web::json::value& val) {{/isDateTime}}{{^isDateTime}}{{#vendorExtensions.x-codegen-file}}{{setter}}(ModelBase::fileFromJson(val[U("{{baseName}}")])); {{/vendorExtensions.x-codegen-file}}{{^vendorExtensions.x-codegen-file}}{{{datatype}}} new{{name}}({{{defaultValue}}}); new{{name}}->fromJson(val[U("{{baseName}}")]); - {{setter}}( newItem ); + {{setter}}( new{{name}} ); {{/vendorExtensions.x-codegen-file}}{{/isDateTime}}{{/isString}}{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}} }