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 59fa1f75d57..4b64c995c8b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -265,7 +265,7 @@ export class {{classname}} extends runtime.BaseAPI { {{/isEnumRef}} {{^isEnumRef}} {{^withoutRuntimeChecks}} - formParams.append('{{baseName}}', new Blob([JSON.stringify({{returnType}}ToJSON(requestParameters['{{paramName}}']))], { type: "application/json", })); + formParams.append('{{baseName}}', new Blob([JSON.stringify({{datatype}}ToJSON(requestParameters['{{paramName}}']))], { type: "application/json", })); {{/withoutRuntimeChecks}}{{#withoutRuntimeChecks}} formParams.append('{{baseName}}', new Blob([JSON.stringify(requestParameters['{{paramName}}'])], { type: "application/json", })); {{/withoutRuntimeChecks}}