From f773ac7bfeefe0a3f6c41a74770bae4d16ac6c82 Mon Sep 17 00:00:00 2001 From: Alexey Makhrov Date: Sun, 18 Sep 2022 23:46:22 -0700 Subject: [PATCH] [typescript-angular] Support body for DELETE requests (#13457) * [typescript-angular] Update api template to use HttpClient#request instead of its http-method-specific wrappers * update expected output for integration tests * regenerate samples --- .../typescript-angular/api.service.mustache | 11 +++++++-- .../api/user.service.ts | 8 +++---- .../api/project.service.ts | 14 +++++------ .../api/matrixParams.service.ts | 12 ++++------ .../petstore-expected/api/pet.service.ts | 24 +++++++++---------- .../petstore-expected/api/store.service.ts | 10 ++++---- .../petstore-expected/api/user.service.ts | 24 +++++++++---------- .../builds/default/api/default.service.ts | 6 ++--- .../builds/default/api/pet.service.ts | 24 +++++++++---------- .../builds/default/api/store.service.ts | 10 ++++---- .../builds/default/api/user.service.ts | 24 +++++++++---------- .../builds/default/api/pet.service.ts | 24 +++++++++---------- .../builds/default/api/store.service.ts | 10 ++++---- .../builds/default/api/user.service.ts | 24 +++++++++---------- .../builds/with-npm/api/pet.service.ts | 24 +++++++++---------- .../builds/with-npm/api/store.service.ts | 10 ++++---- .../builds/with-npm/api/user.service.ts | 24 +++++++++---------- .../builds/default/api/default.service.ts | 6 ++--- .../builds/default/api/pet.service.ts | 24 +++++++++---------- .../builds/default/api/store.service.ts | 10 ++++---- .../builds/default/api/user.service.ts | 24 +++++++++---------- .../builds/default/api/pet.service.ts | 24 +++++++++---------- .../builds/default/api/store.service.ts | 10 ++++---- .../builds/default/api/user.service.ts | 24 +++++++++---------- .../builds/with-npm/api/pet.service.ts | 24 +++++++++---------- .../builds/with-npm/api/store.service.ts | 10 ++++---- .../builds/with-npm/api/user.service.ts | 24 +++++++++---------- .../builds/default/api/pet.service.ts | 24 +++++++++---------- .../builds/default/api/store.service.ts | 10 ++++---- .../builds/default/api/user.service.ts | 24 +++++++++---------- 30 files changed, 262 insertions(+), 259 deletions(-) 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 d26a53825dc..3a42146e509 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 @@ -366,12 +366,19 @@ export class {{classname}} { {{/isResponseFile}} let localVarPath = `{{{path}}}`; - return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}${localVarPath}`,{{#isBodyAllowed}} - {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}} + return this.httpClient.request{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}('{{httpMethod}}', `${this.configuration.basePath}${localVarPath}`, { {{#httpContextInOptions}} context: localVarHttpContext, {{/httpContextInOptions}} + {{#bodyParam}} + body: {{paramName}}, + {{/bodyParam}} + {{^bodyParam}} + {{#hasFormParams}} + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + {{/hasFormParams}} + {{/bodyParam}} {{#hasQueryParamsOrAuth}} params: localVarQueryParameters, {{/hasQueryParamsOrAuth}} diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/api/user.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/api/user.service.ts index 3741811e01f..f8e573e7c75 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/api/user.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/api/user.service.ts @@ -142,10 +142,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -206,10 +206,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/api/project.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/api/project.service.ts index c6e33299a2c..960db464de2 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/api/project.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/api/project.service.ts @@ -185,10 +185,10 @@ export class ProjectService { } let localVarPath = `/projects`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -245,7 +245,7 @@ export class ProjectService { } let localVarPath = `/projects/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -304,7 +304,7 @@ export class ProjectService { } let localVarPath = `/projects/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -401,7 +401,7 @@ export class ProjectService { } let localVarPath = `/projects`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -503,10 +503,10 @@ export class ProjectService { } let localVarPath = `/projects/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/api/matrixParams.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/api/matrixParams.service.ts index 099eb554e1f..42f3cbcbdd0 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/api/matrixParams.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/api/matrixParams.service.ts @@ -132,8 +132,7 @@ export class MatrixParamsService { } let localVarPath = `/complexMatrixParamExploded${this.configuration.encodeParam({name: "matrixParamExploded", value: matrixParamExploded, in: "path", style: "matrix", explode: true, dataType: "ComplexParams", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - null, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -186,8 +185,7 @@ export class MatrixParamsService { } let localVarPath = `/complexMatrixParamFlat${this.configuration.encodeParam({name: "matrixParamFlat", value: matrixParamFlat, in: "path", style: "matrix", explode: false, dataType: "ComplexParams", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - null, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -240,8 +238,7 @@ export class MatrixParamsService { } let localVarPath = `/plainMatrixParamFlat${this.configuration.encodeParam({name: "plainParamFlat", value: plainParamFlat, in: "path", style: "matrix", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - null, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -294,8 +291,7 @@ export class MatrixParamsService { } let localVarPath = `/date-timeMatrixParamFlat${this.configuration.encodeParam({name: "dateTimeParamFlat", value: dateTimeParamFlat, in: "path", style: "matrix", explode: false, dataType: "string", dataFormat: "date-time"})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - null, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/pet.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/pet.service.ts index 8acb855e371..9613f31f3f1 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/pet.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/pet.service.ts @@ -168,10 +168,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -237,7 +237,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -310,7 +310,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -384,7 +384,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -452,7 +452,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -526,10 +526,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -615,10 +615,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -708,10 +708,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts index 754df0c9625..374f8f02e75 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -326,10 +326,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/user.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/user.service.ts index 83261777c31..a15f9bca62a 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/user.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/user.service.ts @@ -145,10 +145,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -211,10 +211,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -277,10 +277,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -336,7 +336,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -395,7 +395,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -468,7 +468,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -522,7 +522,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -592,10 +592,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/api/default.service.ts b/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/api/default.service.ts index df2c94ed3e8..bd0f78c6e08 100644 --- a/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/api/default.service.ts +++ b/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/api/default.service.ts @@ -132,7 +132,7 @@ export class DefaultService { } let localVarPath = `/`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -194,10 +194,10 @@ export class DefaultService { } let localVarPath = `/`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/pet.service.ts index af5e66c44f0..b59d02e26ac 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/pet.service.ts @@ -168,10 +168,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -237,7 +237,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -310,7 +310,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -385,7 +385,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -453,7 +453,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -527,10 +527,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -616,10 +616,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -709,10 +709,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts index e74edb114d9..6160c6b7c26 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -326,10 +326,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/user.service.ts index f45439fe6fd..ad578c04204 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/user.service.ts @@ -145,10 +145,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -211,10 +211,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -277,10 +277,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -336,7 +336,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -395,7 +395,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -468,7 +468,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -522,7 +522,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -592,10 +592,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts index 6cc2d34c403..7a51c36ce95 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/pet.service.ts @@ -168,10 +168,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -237,7 +237,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -310,7 +310,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -385,7 +385,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -453,7 +453,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -527,10 +527,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -616,10 +616,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -709,10 +709,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts index 754df0c9625..374f8f02e75 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -326,10 +326,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts index 26e8ad6f58c..f193dd635e2 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/user.service.ts @@ -145,10 +145,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -211,10 +211,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -277,10 +277,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -336,7 +336,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -395,7 +395,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -468,7 +468,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -522,7 +522,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -592,10 +592,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts index 6cc2d34c403..7a51c36ce95 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/pet.service.ts @@ -168,10 +168,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -237,7 +237,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -310,7 +310,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -385,7 +385,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -453,7 +453,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -527,10 +527,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -616,10 +616,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -709,10 +709,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts index 754df0c9625..374f8f02e75 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -326,10 +326,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts index 26e8ad6f58c..f193dd635e2 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/user.service.ts @@ -145,10 +145,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -211,10 +211,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -277,10 +277,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -336,7 +336,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -395,7 +395,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -468,7 +468,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -522,7 +522,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -592,10 +592,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/api/default.service.ts b/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/api/default.service.ts index df2c94ed3e8..bd0f78c6e08 100644 --- a/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/api/default.service.ts +++ b/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/api/default.service.ts @@ -132,7 +132,7 @@ export class DefaultService { } let localVarPath = `/`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -194,10 +194,10 @@ export class DefaultService { } let localVarPath = `/`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/pet.service.ts index af5e66c44f0..b59d02e26ac 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/pet.service.ts @@ -168,10 +168,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -237,7 +237,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -310,7 +310,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -385,7 +385,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -453,7 +453,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -527,10 +527,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -616,10 +616,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -709,10 +709,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts index e74edb114d9..6160c6b7c26 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -326,10 +326,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/user.service.ts index f45439fe6fd..ad578c04204 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/user.service.ts @@ -145,10 +145,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -211,10 +211,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -277,10 +277,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -336,7 +336,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -395,7 +395,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -468,7 +468,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -522,7 +522,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -592,10 +592,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - body, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: body, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts index f4a214bac67..c27a2e8f8e2 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/pet.service.ts @@ -171,10 +171,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - pet, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: pet, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -241,7 +241,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -314,7 +314,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -389,7 +389,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -457,7 +457,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -534,10 +534,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - pet, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: pet, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -624,10 +624,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -718,10 +718,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts index 246a1826607..2aa584617fb 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -328,10 +328,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - order, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: order, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts index b92dabef133..62cbf7b6e8d 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/user.service.ts @@ -153,10 +153,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -228,10 +228,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -303,10 +303,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -369,7 +369,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -429,7 +429,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -503,7 +503,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -565,7 +565,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -643,10 +643,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts index f4a214bac67..c27a2e8f8e2 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/pet.service.ts @@ -171,10 +171,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - pet, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: pet, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -241,7 +241,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -314,7 +314,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -389,7 +389,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -457,7 +457,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -534,10 +534,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - pet, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: pet, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -624,10 +624,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -718,10 +718,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts index 246a1826607..2aa584617fb 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -328,10 +328,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - order, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: order, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts index b92dabef133..62cbf7b6e8d 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/user.service.ts @@ -153,10 +153,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -228,10 +228,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -303,10 +303,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -369,7 +369,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -429,7 +429,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -503,7 +503,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -565,7 +565,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -643,10 +643,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/pet.service.ts index f4a214bac67..c27a2e8f8e2 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/pet.service.ts @@ -171,10 +171,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - pet, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: pet, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -241,7 +241,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -314,7 +314,7 @@ export class PetService { } let localVarPath = `/pet/findByStatus`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -389,7 +389,7 @@ export class PetService { } let localVarPath = `/pet/findByTags`; - return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -457,7 +457,7 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -534,10 +534,10 @@ export class PetService { } let localVarPath = `/pet`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - pet, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: pet, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -624,10 +624,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -718,10 +718,10 @@ export class PetService { } let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts index 246a1826607..2aa584617fb 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts @@ -137,7 +137,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -199,7 +199,7 @@ export class StoreService { } let localVarPath = `/store/inventory`; - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -259,7 +259,7 @@ export class StoreService { } let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -328,10 +328,10 @@ export class StoreService { } let localVarPath = `/store/order`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - order, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: order, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/user.service.ts index b92dabef133..62cbf7b6e8d 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/user.service.ts @@ -153,10 +153,10 @@ export class UserService { } let localVarPath = `/user`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -228,10 +228,10 @@ export class UserService { } let localVarPath = `/user/createWithArray`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -303,10 +303,10 @@ export class UserService { } let localVarPath = `/user/createWithList`; - return this.httpClient.post(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, @@ -369,7 +369,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.delete(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -429,7 +429,7 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -503,7 +503,7 @@ export class UserService { } let localVarPath = `/user/login`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -565,7 +565,7 @@ export class UserService { } let localVarPath = `/user/logout`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, @@ -643,10 +643,10 @@ export class UserService { } let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.put(`${this.configuration.basePath}${localVarPath}`, - user, + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, + body: user, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders,