From f756bd5e11a4ba5e0f4b38f6cd3003eb017912d6 Mon Sep 17 00:00:00 2001 From: Prateek Malhotra Date: Mon, 5 Aug 2019 13:48:52 -0400 Subject: [PATCH] typescript-fetch: Properly detect and encode container request body param (#3517) 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 662ec63b5b8..d1751f7135d 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}}