diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index eba3a2a08992..697438906315 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -342,7 +342,7 @@ export class {{classname}} { {{/isListContainer}} {{^isListContainer}} if ({{paramName}} !== undefined) { - {{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', {{^isModel}}{{paramName}}{{/isModel}}{{#isModel}}useForm ? JSON.stringify({{paramName}}) : {{paramName}}{{/isModel}}){{#useHttpClient}} as any || formParams{{/useHttpClient}}; + {{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', {{^isModel}}{{paramName}}{{/isModel}}{{#isModel}}useForm ? new Blob([JSON.stringify({{paramName}})], {type: 'application/json'}) : {{paramName}}{{/isModel}}){{#useHttpClient}} as any || formParams{{/useHttpClient}}; } {{/isListContainer}} {{/formParams}}