From 35d9ccafc6935cc4588b395a3506aeca35b26bbd Mon Sep 17 00:00:00 2001 From: Yimin Lin Date: Tue, 28 Aug 2018 17:18:49 +0800 Subject: [PATCH] Fixed missing initialization of postBody --- modules/openapi-generator/src/main/resources/dart2/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index 18a70be92aba..76797fa2ddc3 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -13,7 +13,7 @@ class {{classname}} { /// /// {{notes}} {{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { - Object postBody; + Object postBody{{#bodyParam}} = {{paramName}}{{/bodyParam}}; // verify required params are set {{#allParams}}