From 8496ba6b98e6a71e1eaa66b1c6dba023cea2d0d9 Mon Sep 17 00:00:00 2001 From: Malhotra Date: Wed, 31 Jul 2019 18:15:29 -0400 Subject: [PATCH] typescript-fetch: Properly detect and encode container request body param Signed-off-by: Prateek Malhotra Co-Authored-By: Esteban Gehring --- .../src/main/resources/typescript-fetch/apis.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index 662ec63b5b81..d1751f7135d8 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -181,7 +181,7 @@ export class {{classname}} extends runtime.BaseAPI { {{#hasBodyParam}} {{#bodyParam}} {{#isContainer}} - body: requestParameters.{{paramName}}.map({{#items}}{{datatype}}{{/items}}ToJSON), + body: requestParameters.{{paramName}}{{#isListContainer}}{{#items}}{{^isPrimitiveType}}.map({{datatype}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isListContainer}}, {{/isContainer}} {{^isContainer}} {{^isPrimitiveType}}