Skip to content

Commit 25c7ccf

Browse files
nitoqqberdoc
andauthored
JS Client: Allow dot in path parameter name (#6116)
* JS Client: Allow dot in path parameter name * JS Client: Allow dot in path parameter name * Delete ApiClient.js * Delete ApiClient.js Co-authored-by: Nikolai Konovalov <[email protected]>
1 parent 64c57e3 commit 25c7ccf

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
}
164164

165165
var _this = this;
166-
url = url.replace(/\{([\w-]+)\}/g, function(fullMatch, key) {
166+
url = url.replace(/\{([\w-\.]+)\}/g, function(fullMatch, key) {
167167
var value;
168168
if (pathParams.hasOwnProperty(key)) {
169169
value = _this.paramToString(pathParams[key]);

modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class ApiClient {
153153
url = apiBasePath + path;
154154
}
155155

156-
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
156+
url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => {
157157
var value;
158158
if (pathParams.hasOwnProperty(key)) {
159159
value = this.paramToString(pathParams[key]);

samples/client/petstore/javascript-es6/src/ApiClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class ApiClient {
152152
url = apiBasePath + path;
153153
}
154154

155-
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
155+
url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => {
156156
var value;
157157
if (pathParams.hasOwnProperty(key)) {
158158
value = this.paramToString(pathParams[key]);

samples/client/petstore/javascript-promise-es6/src/ApiClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class ApiClient {
152152
url = apiBasePath + path;
153153
}
154154

155-
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
155+
url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => {
156156
var value;
157157
if (pathParams.hasOwnProperty(key)) {
158158
value = this.paramToString(pathParams[key]);

0 commit comments

Comments
 (0)