diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/ApiClient.mustache index c3f9993e0d0..542398b7f03 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/ApiClient.mustache @@ -160,7 +160,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 8c58f5c4911..271dc70cf0e 100644 --- a/samples/client/petstore/javascript-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-es6/src/ApiClient.js @@ -159,7 +159,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 44d8c46bc33..12762f0d47c 100644 --- a/samples/client/petstore/javascript-promise-es6/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise-es6/src/ApiClient.js @@ -159,7 +159,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]);