diff --git a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache index f4f2024f4c6..3c1751b70a5 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache @@ -163,7 +163,7 @@ } var _this = this; - url = url.replace(/\{([\w-]+)\}/g, function(fullMatch, key) { + url = url.replace(/\{([\w-\.]+)\}/g, function(fullMatch, key) { var value; if (pathParams.hasOwnProperty(key)) { value = _this.paramToString(pathParams[key]); diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache index 91728cd6ea9..c356fd6f45e 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache @@ -153,7 +153,7 @@ class ApiClient { url = apiBasePath + path; } - url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { + url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => { var value; if (pathParams.hasOwnProperty(key)) { value = this.paramToString(pathParams[key]); diff --git a/samples/client/petstore/javascript-es6/src/ApiClient.js b/samples/client/petstore/javascript-es6/src/ApiClient.js index 947a9e05217..4a73394c094 100644 --- a/samples/client/petstore/javascript-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-es6/src/ApiClient.js @@ -152,7 +152,7 @@ class ApiClient { url = apiBasePath + path; } - url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { + url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => { var value; if (pathParams.hasOwnProperty(key)) { value = this.paramToString(pathParams[key]); diff --git a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js index dbf723afbf0..d5d9e1a7230 100644 --- a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js @@ -152,7 +152,7 @@ class ApiClient { url = apiBasePath + path; } - url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { + url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => { var value; if (pathParams.hasOwnProperty(key)) { value = this.paramToString(pathParams[key]);