Skip to content

Commit 4851d2e

Browse files
fixed ui bug in case of more than one parameter on the url
1 parent 0140896 commit 4851d2e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

jsondoc-sample-springmvc/src/main/webapp/jsondoc.jsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,10 @@ ol.linenums li {
559559
headers["Accept"] = $("#produces input:checked").val();
560560
561561
var replacedPath = method.path;
562+
var tempReplacedPath = replacedPath; // this is to handle more than one parameter on the url
562563
$("#urlparameters input").each(function() {
563-
replacedPath = method.path.replace("{"+this.name+"}", $(this).val());
564+
tempReplacedPath = replacedPath.replace("{"+this.name+"}", $(this).val());
565+
replacedPath = tempReplacedPath;
564566
});
565567
566568
$('#testButton').button('loading');

jsondoc-ui/src/main/webapp/jsondoc.jsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,10 @@ ol.linenums li {
559559
headers["Accept"] = $("#produces input:checked").val();
560560
561561
var replacedPath = method.path;
562+
var tempReplacedPath = replacedPath; // this is to handle more than one parameter on the url
562563
$("#urlparameters input").each(function() {
563-
replacedPath = method.path.replace("{"+this.name+"}", $(this).val());
564+
tempReplacedPath = replacedPath.replace("{"+this.name+"}", $(this).val());
565+
replacedPath = tempReplacedPath;
564566
});
565567
566568
$('#testButton').button('loading');

0 commit comments

Comments
 (0)