diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index 59fa1f75d57..dfe4f97471e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -277,8 +277,32 @@ export class {{classname}} extends runtime.BaseAPI { {{/isArray}} {{/formParams}} {{/hasFormParams}} + + let urlPath = `{{{path}}}`; + {{#pathParams}} + {{#isDateTimeType}} + if (requestParameters['{{paramName}}'] instanceof Date) { + urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(requestParameters['{{paramName}}'].toISOString())); + } else { + urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}']))); + } + {{/isDateTimeType}} + {{^isDateTimeType}} + {{#isDateType}} + if (requestParameters['{{paramName}}'] instanceof Date) { + urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(requestParameters['{{paramName}}'].toISOString().substring(0,10)); + } else { + urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}']))); + } + {{/isDateType}} + {{^isDateType}} + urlPath = urlPath.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}']))); + {{/isDateType}} + {{/isDateTimeType}} + {{/pathParams}} + const response = await this.request({ - path: `{{{path}}}`{{#pathParams}}.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String(requestParameters['{{paramName}}']))){{/pathParams}}, + path: urlPath, method: '{{httpMethod}}', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts index 38da4f052ba..ae2d4c75887 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts @@ -45,8 +45,12 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/person/display/{personId}`; + urlPath = urlPath.replace(`{${"personId"}}`, encodeURIComponent(String(requestParameters['personId']))); + const response = await this.request({ - path: `/person/display/{personId}`.replace(`{${"personId"}}`, encodeURIComponent(String(requestParameters['personId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts index 38da4f052ba..ae2d4c75887 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts @@ -45,8 +45,12 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/person/display/{personId}`; + urlPath = urlPath.replace(`{${"personId"}}`, encodeURIComponent(String(requestParameters['personId']))); + const response = await this.request({ - path: `/person/display/{personId}`.replace(`{${"personId"}}`, encodeURIComponent(String(requestParameters['personId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts index e63d48d42bd..f5ba5857f5c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts @@ -49,8 +49,11 @@ export class AnotherFakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/another-fake/dummy`; + const response = await this.request({ - path: `/another-fake/dummy`, + path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/DefaultApi.ts index ef9dde7a080..ce1e24dc07f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/DefaultApi.ts @@ -34,8 +34,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/foo`; + const response = await this.request({ - path: `/foo`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts index 12df4e51387..72800d8405f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts @@ -181,8 +181,11 @@ export class FakeApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/BigDecimalMap`; + const response = await this.request({ - path: `/fake/BigDecimalMap`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -207,8 +210,11 @@ export class FakeApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/health`; + const response = await this.request({ - path: `/fake/health`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -250,8 +256,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['header_1'] = String(requestParameters['header1']); } + + let urlPath = `/fake/http-signature-test`; + const response = await this.request({ - path: `/fake/http-signature-test`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -278,8 +287,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/boolean`; + const response = await this.request({ - path: `/fake/outer/boolean`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -311,8 +323,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/composite`; + const response = await this.request({ - path: `/fake/outer/composite`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -340,8 +355,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/number`; + const response = await this.request({ - path: `/fake/outer/number`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -373,8 +391,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/string`; + const response = await this.request({ - path: `/fake/outer/string`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -413,8 +434,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/property/enum-int`; + const response = await this.request({ - path: `/fake/property/enum-int`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -450,8 +474,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/additionalProperties-reference`; + const response = await this.request({ - path: `/fake/additionalProperties-reference`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -486,8 +513,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'image/png'; + + let urlPath = `/fake/body-with-binary`; + const response = await this.request({ - path: `/fake/body-with-binary`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -521,8 +551,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/body-with-file-schema`; + const response = await this.request({ - path: `/fake/body-with-file-schema`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -566,8 +599,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/body-with-query-params`; + const response = await this.request({ - path: `/fake/body-with-query-params`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -601,8 +637,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, @@ -733,8 +772,11 @@ export class FakeApi extends runtime.BaseAPI { formParams.append('callback', requestParameters['callback'] as any); } + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -811,8 +853,11 @@ export class FakeApi extends runtime.BaseAPI { formParams.append('enum_form_string', requestParameters['enumFormString'] as any); } + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -892,8 +937,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -928,8 +976,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/inline-additionalProperties`; + const response = await this.request({ - path: `/fake/inline-additionalProperties`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -965,8 +1016,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/inline-freeform-additionalProperties`; + const response = await this.request({ - path: `/fake/inline-freeform-additionalProperties`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1029,8 +1083,11 @@ export class FakeApi extends runtime.BaseAPI { formParams.append('param2', requestParameters['param2'] as any); } + + let urlPath = `/fake/jsonFormData`; + const response = await this.request({ - path: `/fake/jsonFormData`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1066,8 +1123,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/nullable`; + const response = await this.request({ - path: `/fake/nullable`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -1163,8 +1223,11 @@ export class FakeApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/test-query-parameters`; + const response = await this.request({ - path: `/fake/test-query-parameters`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -1198,8 +1261,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/stringMap-reference`; + const response = await this.request({ - path: `/fake/stringMap-reference`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts index e2cf17eb7a2..cdefdb8e795 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts @@ -53,8 +53,11 @@ export class FakeClassnameTags123Api extends runtime.BaseAPI { queryParameters["api_key_query"] = await this.configuration.apiKey("api_key_query"); // api_key_query authentication } + + let urlPath = `/fake_classname_test`; + const response = await this.request({ - path: `/fake_classname_test`, + path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts index 5b77f2de448..2a981252013 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts @@ -96,8 +96,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -140,8 +143,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -183,8 +190,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -228,8 +238,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -268,8 +281,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -310,8 +327,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -372,8 +392,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -436,8 +460,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -508,8 +536,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('requiredFile', requestParameters['requiredFile'] as any); } + + let urlPath = `/fake/{petId}/uploadImageWithRequiredFile`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/fake/{petId}/uploadImageWithRequiredFile`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts index 4a7ee687d8d..3ba8c2cab72 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{order_id}`; + urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{order_id}`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{order_id}`; + urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{order_id}`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -158,8 +169,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts index b151cb1eaac..83a5374e23a 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -112,8 +115,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -149,8 +155,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -184,8 +193,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -218,8 +231,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -268,8 +285,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -300,8 +320,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -343,8 +366,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts index 22062ecf531..586438f033c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts @@ -89,8 +89,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -131,8 +134,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -173,8 +180,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -218,8 +228,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -258,8 +271,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -299,8 +316,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -359,8 +379,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -421,8 +445,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts index 49163cc4b46..0bcfdbf8460 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,8 +168,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts index 03a5448df52..43799227666 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -111,8 +114,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -146,8 +152,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -180,8 +189,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -213,8 +226,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -261,8 +278,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -291,8 +311,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -333,8 +356,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts index 88a965dfc12..d6ef42525e4 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts @@ -81,8 +81,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/enum-request-inline`; + const response = await this.request({ - path: `/fake/enum-request-inline`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +124,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/enum-request-ref`; + const response = await this.request({ - path: `/fake/enum-request-ref`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -147,8 +153,11 @@ export class DefaultApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/enum-request-inline`; + const response = await this.request({ - path: `/fake/enum-request-inline`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -174,8 +183,11 @@ export class DefaultApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/enum-request-ref`; + const response = await this.request({ - path: `/fake/enum-request-ref`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts index 22062ecf531..586438f033c 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts @@ -89,8 +89,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -131,8 +134,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -173,8 +180,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -218,8 +228,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -258,8 +271,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -299,8 +316,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -359,8 +379,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -421,8 +445,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts index 49163cc4b46..0bcfdbf8460 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,8 +168,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts index 03a5448df52..43799227666 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -111,8 +114,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -146,8 +152,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -180,8 +189,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -213,8 +226,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -261,8 +278,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -291,8 +311,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -333,8 +356,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts index 66a4232c389..1c67884763c 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts @@ -89,8 +89,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -131,8 +134,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -173,8 +180,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -218,8 +228,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -258,8 +271,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -299,8 +316,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -359,8 +379,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -421,8 +445,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts index 8cf46da17dd..b3a1f18a31c 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,8 +168,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts index b60bf74dc41..eb9fbebf507 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -111,8 +114,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -146,8 +152,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -180,8 +189,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -213,8 +226,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -261,8 +278,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -291,8 +311,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -333,8 +356,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/apis/DefaultApi.ts index f7e1936ab80..be5025be118 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/apis/DefaultApi.ts @@ -37,8 +37,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/test`; + const response = await this.request({ - path: `/test`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -61,8 +64,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/test-array`; + const response = await this.request({ - path: `/test-array`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts index 4776d47251c..4503fa90ce1 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts @@ -89,8 +89,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -131,8 +134,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -173,8 +180,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -218,8 +228,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -258,8 +271,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -299,8 +316,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -359,8 +379,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -421,8 +445,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts index 58434bd8740..c0a916bebe9 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,8 +168,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts index b18b7fd43c5..6b8bd7d113b 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -111,8 +114,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -146,8 +152,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -180,8 +189,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -213,8 +226,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -261,8 +278,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -291,8 +311,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -333,8 +356,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts index e20073b50cb..eaee9f44b95 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts @@ -53,8 +53,12 @@ export class BehaviorApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake_behavior/{behavior-id}/permissions`; + urlPath = urlPath.replace(`{${"behavior-id"}}`, encodeURIComponent(String(requestParameters['behaviorId']))); + const response = await this.request({ - path: `/fake_behavior/{behavior-id}/permissions`.replace(`{${"behavior-id"}}`, encodeURIComponent(String(requestParameters['behaviorId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -86,8 +90,12 @@ export class BehaviorApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake_behavior/{behavior-id}/type`; + urlPath = urlPath.replace(`{${"behavior-id"}}`, encodeURIComponent(String(requestParameters['behaviorId']))); + const response = await this.request({ - path: `/fake_behavior/{behavior-id}/type`.replace(`{${"behavior-id"}}`, encodeURIComponent(String(requestParameters['behaviorId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts index f1f83a90663..fff5fd90fed 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts @@ -118,8 +118,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -160,8 +163,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -203,8 +210,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByIds`; + const response = await this.request({ - path: `/pet/findByIds`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -248,8 +258,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -293,8 +306,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -339,8 +355,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByUserIds`; + const response = await this.request({ - path: `/pet/findByUserIds`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -379,8 +398,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -413,8 +436,12 @@ export class PetApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/pet/{petId}/regions`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/regions`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -453,8 +480,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -495,8 +525,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/pet/{petId}/regions`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/regions`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -556,8 +590,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -618,8 +656,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts index c1c514c3f8a..4cb50b19831 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts @@ -58,8 +58,12 @@ export class PetPartApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake_petParts/{fake_petPart-id}/part-type`; + urlPath = urlPath.replace(`{${"fake_petPart-id"}}`, encodeURIComponent(String(requestParameters['fakePetPartId']))); + const response = await this.request({ - path: `/fake_petParts/{fake_petPart-id}/part-type`.replace(`{${"fake_petPart-id"}}`, encodeURIComponent(String(requestParameters['fakePetPartId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -132,8 +136,12 @@ export class PetPartApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake_petParts/{fake_petPart-id}/matching-parts`; + urlPath = urlPath.replace(`{${"fake_petPart-id"}}`, encodeURIComponent(String(requestParameters['fakePetPartId']))); + const response = await this.request({ - path: `/fake_petParts/{fake_petPart-id}/matching-parts`.replace(`{${"fake_petPart-id"}}`, encodeURIComponent(String(requestParameters['fakePetPartId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts index 8cf46da17dd..b3a1f18a31c 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,8 +168,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts index 0a634a21cf2..3c7d7dd91a5 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts @@ -78,8 +78,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -114,8 +117,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -149,8 +155,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -183,8 +192,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -216,8 +229,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -264,8 +281,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -294,8 +314,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -336,8 +359,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts index e63d48d42bd..f5ba5857f5c 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts @@ -49,8 +49,11 @@ export class AnotherFakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/another-fake/dummy`; + const response = await this.request({ - path: `/another-fake/dummy`, + path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/DefaultApi.ts index ef9dde7a080..ce1e24dc07f 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/DefaultApi.ts @@ -34,8 +34,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/foo`; + const response = await this.request({ - path: `/foo`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts index 23e46bbf742..4c6c8605a6d 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts @@ -159,8 +159,11 @@ export class FakeApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/BigDecimalMap`; + const response = await this.request({ - path: `/fake/BigDecimalMap`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -185,8 +188,11 @@ export class FakeApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/health`; + const response = await this.request({ - path: `/fake/health`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -228,8 +234,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['header_1'] = String(requestParameters['header1']); } + + let urlPath = `/fake/http-signature-test`; + const response = await this.request({ - path: `/fake/http-signature-test`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -256,8 +265,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/boolean`; + const response = await this.request({ - path: `/fake/outer/boolean`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -289,8 +301,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/composite`; + const response = await this.request({ - path: `/fake/outer/composite`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -318,8 +333,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/number`; + const response = await this.request({ - path: `/fake/outer/number`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -351,8 +369,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/outer/string`; + const response = await this.request({ - path: `/fake/outer/string`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -391,8 +412,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/property/enum-int`; + const response = await this.request({ - path: `/fake/property/enum-int`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -427,8 +451,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'image/png'; + + let urlPath = `/fake/body-with-binary`; + const response = await this.request({ - path: `/fake/body-with-binary`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -462,8 +489,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/body-with-file-schema`; + const response = await this.request({ - path: `/fake/body-with-file-schema`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -507,8 +537,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/body-with-query-params`; + const response = await this.request({ - path: `/fake/body-with-query-params`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -542,8 +575,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, @@ -674,8 +710,11 @@ export class FakeApi extends runtime.BaseAPI { formParams.append('callback', requestParameters['callback'] as any); } + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -752,8 +791,11 @@ export class FakeApi extends runtime.BaseAPI { formParams.append('enum_form_string', requestParameters['enumFormString'] as any); } + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -833,8 +875,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } + + let urlPath = `/fake`; + const response = await this.request({ - path: `/fake`, + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -869,8 +914,11 @@ export class FakeApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/inline-additionalProperties`; + const response = await this.request({ - path: `/fake/inline-additionalProperties`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -933,8 +981,11 @@ export class FakeApi extends runtime.BaseAPI { formParams.append('param2', requestParameters['param2'] as any); } + + let urlPath = `/fake/jsonFormData`; + const response = await this.request({ - path: `/fake/jsonFormData`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -1030,8 +1081,11 @@ export class FakeApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/test-query-parameters`; + const response = await this.request({ - path: `/fake/test-query-parameters`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts index e2cf17eb7a2..cdefdb8e795 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts @@ -53,8 +53,11 @@ export class FakeClassnameTags123Api extends runtime.BaseAPI { queryParameters["api_key_query"] = await this.configuration.apiKey("api_key_query"); // api_key_query authentication } + + let urlPath = `/fake_classname_test`; + const response = await this.request({ - path: `/fake_classname_test`, + path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts index 5b77f2de448..2a981252013 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts @@ -96,8 +96,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -140,8 +143,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -183,8 +190,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -228,8 +238,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -268,8 +281,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -310,8 +327,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -372,8 +392,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -436,8 +460,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -508,8 +536,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('requiredFile', requestParameters['requiredFile'] as any); } + + let urlPath = `/fake/{petId}/uploadImageWithRequiredFile`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/fake/{petId}/uploadImageWithRequiredFile`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts index 4a7ee687d8d..3ba8c2cab72 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{order_id}`; + urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{order_id}`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{order_id}`; + urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{order_id}`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -158,8 +169,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts index b151cb1eaac..83a5374e23a 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -112,8 +115,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -149,8 +155,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -184,8 +193,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -218,8 +231,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -268,8 +285,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -300,8 +320,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -343,8 +366,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts index a791292c47a..b66ef90918b 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts @@ -90,8 +90,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -135,8 +138,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -178,8 +185,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -223,8 +233,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -263,8 +276,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -305,8 +322,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -368,8 +388,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -432,8 +456,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts index 2e8408d1d2c..7f1528fdb2c 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -158,8 +169,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts index 39e604591ff..756c61cbee4 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts @@ -79,8 +79,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -120,8 +123,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -161,8 +167,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -200,8 +209,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -234,8 +247,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -284,8 +301,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -320,8 +340,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -367,8 +390,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts index c3b33a5b61d..316ff58281e 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts @@ -228,8 +228,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -270,8 +273,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -312,8 +319,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -357,8 +367,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -397,8 +410,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -438,8 +455,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -498,8 +518,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -560,8 +584,12 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts index 7e4e8a7b5ba..770ac98198b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts @@ -126,8 +126,12 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -157,8 +161,11 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -192,8 +199,12 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -228,8 +239,11 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts index 01ec9acf7cc..83ee5cedbbf 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts @@ -208,8 +208,11 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -244,8 +247,11 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -279,8 +285,11 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -313,8 +322,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -346,8 +359,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -394,8 +411,11 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -424,8 +444,11 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -466,8 +489,12 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts index 22062ecf531..586438f033c 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts @@ -89,8 +89,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -131,8 +134,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -173,8 +180,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -218,8 +228,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -258,8 +271,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -299,8 +316,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -359,8 +379,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -421,8 +445,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts index 49163cc4b46..0bcfdbf8460 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts @@ -55,8 +55,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -86,8 +90,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +128,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -157,8 +168,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts index 03a5448df52..43799227666 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts @@ -75,8 +75,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -111,8 +114,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -146,8 +152,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -180,8 +189,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -213,8 +226,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -261,8 +278,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -291,8 +311,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -333,8 +356,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts index 8eb16afcbf4..730f0a06200 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts @@ -81,8 +81,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/enum-request-inline`; + const response = await this.request({ - path: `/fake/enum-request-inline`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -121,8 +124,11 @@ export class DefaultApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/fake/enum-request-ref`; + const response = await this.request({ - path: `/fake/enum-request-ref`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -147,8 +153,11 @@ export class DefaultApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/enum-request-inline`; + const response = await this.request({ - path: `/fake/enum-request-inline`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -174,8 +183,11 @@ export class DefaultApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/fake/enum-request-ref`; + const response = await this.request({ - path: `/fake/enum-request-ref`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts index 29ef7179b71..accc88ffc8a 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts @@ -83,8 +83,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -125,8 +128,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -167,8 +174,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByStatus`; + const response = await this.request({ - path: `/pet/findByStatus`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -212,8 +222,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet/findByTags`; + const response = await this.request({ - path: `/pet/findByTags`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -252,8 +265,12 @@ export class PetApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -293,8 +310,11 @@ export class PetApi extends runtime.BaseAPI { headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]); } + + let urlPath = `/pet`; + const response = await this.request({ - path: `/pet`, + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, @@ -353,8 +373,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('status', requestParameters['status'] as any); } + + let urlPath = `/pet/{petId}`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -415,8 +439,12 @@ export class PetApi extends runtime.BaseAPI { formParams.append('file', requestParameters['file'] as any); } + + let urlPath = `/pet/{petId}/uploadImage`; + urlPath = urlPath.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))); + const response = await this.request({ - path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters['petId']))), + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts index 24740b19763..e650674e0cd 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts @@ -51,8 +51,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -82,8 +86,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication } + + let urlPath = `/store/inventory`; + const response = await this.request({ - path: `/store/inventory`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -117,8 +124,12 @@ export class StoreApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/store/order/{orderId}`; + urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))); + const response = await this.request({ - path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -153,8 +164,11 @@ export class StoreApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/store/order`; + const response = await this.request({ - path: `/store/order`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts index 283e3259aed..90c8a3d4362 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts @@ -71,8 +71,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user`; + const response = await this.request({ - path: `/user`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -107,8 +110,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithArray`; + const response = await this.request({ - path: `/user/createWithArray`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -142,8 +148,11 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/createWithList`; + const response = await this.request({ - path: `/user/createWithList`, + path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, @@ -176,8 +185,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, @@ -209,8 +222,12 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -257,8 +274,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/login`; + const response = await this.request({ - path: `/user/login`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -287,8 +307,11 @@ export class UserApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + + let urlPath = `/user/logout`; + const response = await this.request({ - path: `/user/logout`, + path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, @@ -329,8 +352,12 @@ export class UserApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + + let urlPath = `/user/{username}`; + urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))); + const response = await this.request({ - path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username']))), + path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters,