Skip to content

Commit

Permalink
JS Client: Allow dot in path parameter name
Browse files Browse the repository at this point in the history
  • Loading branch information
berdoc committed Jun 5, 2020
1 parent ccdc15f commit 3f3961d
Show file tree
Hide file tree
Showing 4 changed files with 1,327 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/client/petstore/javascript-es6/src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,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]);
Expand Down
Loading

0 comments on commit 3f3961d

Please sign in to comment.