merged from develop, added fix for #627

This commit is contained in:
Tony Tam
2014-12-02 22:24:47 -08:00
parent 855c015a3f
commit 6961dd7f92
8 changed files with 75 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
// swagger.js
// version 2.0.46
// version 2.0.47
(function () {
@@ -992,9 +992,14 @@
output += encodeURIComponent(param[j]);
}
queryParams += encodeURIComponent(param.name) + '=' + output;
}
else {
queryParams += encodeURIComponent(param.name) + '=' + encodeURIComponent(args[param.name]);
}
else {
if (args[param.name]) {
queryParams += encodeURIComponent(param.name) + '=' + encodeURIComponent(args[param.name]);
} else {
if (param.required)
throw "" + param.name + " is a required query param.";
}
}
}
}
@@ -1275,7 +1280,7 @@
else if (this.type === "DELETE")
body = "{}";
else if (this.type != "DELETE")
accepts = null;
consumes = null;
}
if (consumes && this.operation.consumes) {