Skip to content
This repository was archived by the owner on Feb 9, 2021. It is now read-only.

Commit f756bd5

Browse files
someone1macjohnny
andcommitted
typescript-fetch: Properly detect and encode container request body param (OpenAPITools#3517)
Signed-off-by: Prateek Malhotra <someone1@gmail.com> Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
1 parent fae0738 commit f756bd5

File tree

1 file changed

+1
-1
lines changed
  • modules/openapi-generator/src/main/resources/typescript-fetch

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class {{classname}} extends runtime.BaseAPI {
181181
{{#hasBodyParam}}
182182
{{#bodyParam}}
183183
{{#isContainer}}
184-
body: requestParameters.{{paramName}}.map({{#items}}{{datatype}}{{/items}}ToJSON),
184+
body: requestParameters.{{paramName}}{{#isListContainer}}{{#items}}{{^isPrimitiveType}}.map({{datatype}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isListContainer}},
185185
{{/isContainer}}
186186
{{^isContainer}}
187187
{{^isPrimitiveType}}

0 commit comments

Comments
 (0)