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 28d21d1e299..7ab6c76bb2e 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 @@ -385,15 +385,25 @@ export class {{classname}} { {{/hasFormParams}} {{#useHttpClient}} + {{^isResponseFile}} + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + + {{/isResponseFile}} return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}{{{path}}}`,{{#isBodyAllowed}} {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}convertFormParamsToString ? formParams.toString() : formParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}} { -{{#hasQueryParams}} + {{#hasQueryParams}} params: queryParameters, -{{/hasQueryParams}} -{{#isResponseFile}} + {{/hasQueryParams}} + {{#isResponseFile}} responseType: "blob", -{{/isResponseFile}} + {{/isResponseFile}} + {{^isResponseFile}} + responseType: responseType, + {{/isResponseFile}} withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -414,6 +424,9 @@ export class {{classname}} { {{#isResponseFile}} responseType: ResponseContentType.Blob, {{/isResponseFile}} +{{^isResponseFile}} + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, +{{/isResponseFile}} {{#hasQueryParams}} search: queryParameters, {{/hasQueryParams}} diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index df0ef7ccd01..36d9db6744e 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -246,6 +246,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -291,6 +292,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -340,6 +342,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -390,6 +393,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -432,6 +436,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -484,6 +489,7 @@ export class PetService { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -554,6 +560,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -628,6 +635,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts index 9a84a67805e..5a2292441dd 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts @@ -140,6 +140,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -176,6 +177,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -212,6 +214,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -256,6 +259,7 @@ export class StoreService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts index 49f4c7f4732..229426692fe 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts @@ -219,6 +219,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -261,6 +262,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -303,6 +305,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -337,6 +340,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -372,6 +376,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -419,6 +424,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -449,6 +455,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -496,6 +503,7 @@ export class UserService { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index df0ef7ccd01..36d9db6744e 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -246,6 +246,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -291,6 +292,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -340,6 +342,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -390,6 +393,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -432,6 +436,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -484,6 +489,7 @@ export class PetService { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -554,6 +560,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -628,6 +635,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts index 9a84a67805e..5a2292441dd 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts @@ -140,6 +140,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -176,6 +177,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -212,6 +214,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -256,6 +259,7 @@ export class StoreService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts index 49f4c7f4732..229426692fe 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts @@ -219,6 +219,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -261,6 +262,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -303,6 +305,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -337,6 +340,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -372,6 +376,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -419,6 +424,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -449,6 +455,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -496,6 +503,7 @@ export class UserService { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index 4937a32e7bb..ee64586f950 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -249,6 +249,7 @@ export class PetService implements PetServiceInterface { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -294,6 +295,7 @@ export class PetService implements PetServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -343,6 +345,7 @@ export class PetService implements PetServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -393,6 +396,7 @@ export class PetService implements PetServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -435,6 +439,7 @@ export class PetService implements PetServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -487,6 +492,7 @@ export class PetService implements PetServiceInterface { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -557,6 +563,7 @@ export class PetService implements PetServiceInterface { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -631,6 +638,7 @@ export class PetService implements PetServiceInterface { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts index 744e2a3e9b5..6b2eee80069 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts @@ -143,6 +143,7 @@ export class StoreService implements StoreServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -179,6 +180,7 @@ export class StoreService implements StoreServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -215,6 +217,7 @@ export class StoreService implements StoreServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -259,6 +262,7 @@ export class StoreService implements StoreServiceInterface { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts index 1b4542f3e8b..d999f296618 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts @@ -222,6 +222,7 @@ export class UserService implements UserServiceInterface { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -264,6 +265,7 @@ export class UserService implements UserServiceInterface { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -306,6 +308,7 @@ export class UserService implements UserServiceInterface { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -340,6 +343,7 @@ export class UserService implements UserServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -375,6 +379,7 @@ export class UserService implements UserServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -422,6 +427,7 @@ export class UserService implements UserServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -452,6 +458,7 @@ export class UserService implements UserServiceInterface { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -499,6 +506,7 @@ export class UserService implements UserServiceInterface { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts index 7fe1b177c46..61b38e3aa07 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts @@ -104,9 +104,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -152,8 +158,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -203,9 +215,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -255,9 +273,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -299,8 +323,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -352,9 +382,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -420,9 +456,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -492,9 +534,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts index fc37529edc6..7d46fee178f 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts @@ -73,8 +73,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -111,8 +117,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -149,8 +161,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -194,9 +212,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts index b1cb03cc470..4ae84764be3 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts @@ -81,9 +81,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -125,9 +131,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -169,9 +181,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -206,8 +224,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -243,8 +267,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -292,9 +322,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -324,8 +360,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -372,9 +414,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts index df0ef7ccd01..36d9db6744e 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts @@ -246,6 +246,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -291,6 +292,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -340,6 +342,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -390,6 +393,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -432,6 +436,7 @@ export class PetService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -484,6 +489,7 @@ export class PetService { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -554,6 +560,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -628,6 +635,7 @@ export class PetService { method: RequestMethod.Post, headers: headers, body: convertFormParamsToString ? formParams.toString() : formParams, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts index 9a84a67805e..5a2292441dd 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts @@ -140,6 +140,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -176,6 +177,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -212,6 +214,7 @@ export class StoreService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -256,6 +259,7 @@ export class StoreService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts index 49f4c7f4732..229426692fe 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts @@ -219,6 +219,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -261,6 +262,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -303,6 +305,7 @@ export class UserService { method: RequestMethod.Post, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -337,6 +340,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Delete, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -372,6 +376,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -419,6 +424,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, search: queryParameters, withCredentials:this.configuration.withCredentials }); @@ -449,6 +455,7 @@ export class UserService { let requestOptions: RequestOptionsArgs = new RequestOptions({ method: RequestMethod.Get, headers: headers, + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 @@ -496,6 +503,7 @@ export class UserService { method: RequestMethod.Put, headers: headers, body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 + responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, withCredentials:this.configuration.withCredentials }); // issues#4037 diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index 9e5456808b8..f0b0cff753c 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -104,9 +104,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -152,8 +158,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -203,9 +215,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -255,9 +273,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -299,8 +323,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -352,9 +382,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -420,9 +456,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -492,9 +534,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts index b64d961c32c..68737439b9a 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts @@ -73,8 +73,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -111,8 +117,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -149,8 +161,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -194,9 +212,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts index 8064a6da574..cb25ca73c0f 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts @@ -81,9 +81,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -125,9 +131,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -169,9 +181,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -206,8 +224,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -243,8 +267,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -292,9 +322,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -324,8 +360,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -372,9 +414,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index 9e5456808b8..f0b0cff753c 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -104,9 +104,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -152,8 +158,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -203,9 +215,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -255,9 +273,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -299,8 +323,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -352,9 +382,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -420,9 +456,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -492,9 +534,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts index b64d961c32c..68737439b9a 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -73,8 +73,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -111,8 +117,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -149,8 +161,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -194,9 +212,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts index 8064a6da574..cb25ca73c0f 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -81,9 +81,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -125,9 +131,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -169,9 +181,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -206,8 +224,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -243,8 +267,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -292,9 +322,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -324,8 +360,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -372,9 +414,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index dd6227c1ce0..110615d2f42 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -106,9 +106,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -154,8 +160,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -205,9 +217,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -257,9 +275,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -301,8 +325,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -354,9 +384,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -422,9 +458,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -494,9 +536,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts index dae6e4e90a6..0bacbf87c22 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts @@ -75,8 +75,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -113,8 +119,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -151,8 +163,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -196,9 +214,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts index 00aa65bec1a..d344374967d 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts @@ -83,9 +83,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -127,9 +133,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -171,9 +183,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -208,8 +226,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,8 +269,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -294,9 +324,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -326,8 +362,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -374,9 +416,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index dd6227c1ce0..110615d2f42 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -106,9 +106,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -154,8 +160,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -205,9 +217,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -257,9 +275,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -301,8 +325,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -354,9 +384,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -422,9 +458,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -494,9 +536,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts index dae6e4e90a6..0bacbf87c22 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts @@ -75,8 +75,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -113,8 +119,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -151,8 +163,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -196,9 +214,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts index 00aa65bec1a..d344374967d 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts @@ -83,9 +83,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -127,9 +133,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -171,9 +183,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -208,8 +226,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,8 +269,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -294,9 +324,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -326,8 +362,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -374,9 +416,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts index 9e5456808b8..f0b0cff753c 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts @@ -104,9 +104,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -152,8 +158,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -203,9 +215,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -255,9 +273,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -299,8 +323,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -352,9 +382,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -420,9 +456,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -492,9 +534,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts index b64d961c32c..68737439b9a 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts @@ -73,8 +73,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -111,8 +117,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -149,8 +161,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -194,9 +212,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts index 8064a6da574..cb25ca73c0f 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts @@ -81,9 +81,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -125,9 +131,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -169,9 +181,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -206,8 +224,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -243,8 +267,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -292,9 +322,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -324,8 +360,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -372,9 +414,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts index 9e5456808b8..f0b0cff753c 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -104,9 +104,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -152,8 +158,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -203,9 +215,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -255,9 +273,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -299,8 +323,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -352,9 +382,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -420,9 +456,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -492,9 +534,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts index b64d961c32c..68737439b9a 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -73,8 +73,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -111,8 +117,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -149,8 +161,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -194,9 +212,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts index 8064a6da574..cb25ca73c0f 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -81,9 +81,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -125,9 +131,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -169,9 +181,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -206,8 +224,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -243,8 +267,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -292,9 +322,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -324,8 +360,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -372,9 +414,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts index dd6227c1ce0..110615d2f42 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts @@ -106,9 +106,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -154,8 +160,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -205,9 +217,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -257,9 +275,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -301,8 +325,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -354,9 +384,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -422,9 +458,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -494,9 +536,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts index dae6e4e90a6..0bacbf87c22 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts @@ -75,8 +75,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -113,8 +119,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -151,8 +163,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -196,9 +214,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts index 00aa65bec1a..d344374967d 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts @@ -83,9 +83,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -127,9 +133,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -171,9 +183,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -208,8 +226,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,8 +269,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -294,9 +324,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -326,8 +362,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -374,9 +416,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts index dd6227c1ce0..110615d2f42 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts @@ -106,9 +106,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -154,8 +160,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -205,9 +217,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -257,9 +275,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -301,8 +325,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -354,9 +384,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -422,9 +458,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -494,9 +536,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts index dae6e4e90a6..0bacbf87c22 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts @@ -75,8 +75,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -113,8 +119,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -151,8 +163,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -196,9 +214,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts index 00aa65bec1a..d344374967d 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts @@ -83,9 +83,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -127,9 +133,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -171,9 +183,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -208,8 +226,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,8 +269,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -294,9 +324,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -326,8 +362,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -374,9 +416,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts index 4156b6a005e..1ab6514d615 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts @@ -144,9 +144,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -193,8 +199,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,9 +257,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -298,9 +316,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -343,8 +367,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -397,9 +427,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -466,9 +502,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -539,9 +581,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts index f5ce3496728..624eed3ea74 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts @@ -88,8 +88,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -126,8 +132,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -165,8 +177,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -211,9 +229,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts index 00056c76771..02f139bd64a 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts @@ -114,9 +114,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -159,9 +165,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -204,9 +216,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -242,8 +260,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -280,8 +304,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -330,9 +360,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -362,8 +398,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -411,9 +453,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts index dd6227c1ce0..110615d2f42 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts @@ -106,9 +106,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -154,8 +160,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -205,9 +217,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -257,9 +275,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -301,8 +325,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -354,9 +384,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -422,9 +458,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -494,9 +536,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts index dae6e4e90a6..0bacbf87c22 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts @@ -75,8 +75,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -113,8 +119,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -151,8 +163,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -196,9 +214,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts index 00aa65bec1a..d344374967d 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts @@ -83,9 +83,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -127,9 +133,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -171,9 +183,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -208,8 +226,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,8 +269,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -294,9 +324,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -326,8 +362,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -374,9 +416,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts index dd6227c1ce0..110615d2f42 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts @@ -106,9 +106,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -154,8 +160,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -205,9 +217,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -257,9 +275,15 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -301,8 +325,14 @@ export class PetService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -354,9 +384,15 @@ export class PetService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/pet`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -422,9 +458,15 @@ export class PetService { formParams = formParams.append('status', status) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -494,9 +536,15 @@ export class PetService { formParams = formParams.append('file', file) as any || formParams; } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, convertFormParamsToString ? formParams.toString() : formParams, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts index dae6e4e90a6..0bacbf87c22 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts @@ -75,8 +75,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -113,8 +119,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -151,8 +163,14 @@ export class StoreService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -196,9 +214,15 @@ export class StoreService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/store/order`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts index 00aa65bec1a..d344374967d 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts @@ -83,9 +83,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -127,9 +133,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -171,9 +183,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -208,8 +226,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -245,8 +269,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -294,9 +324,15 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/login`, { params: queryParameters, + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -326,8 +362,14 @@ export class UserService { } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.get(`${this.configuration.basePath}/user/logout`, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -374,9 +416,15 @@ export class UserService { headers = headers.set('Content-Type', httpContentTypeSelected); } + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, body, { + responseType: responseType, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe,