This commit is contained in:
Tony Tam
2015-01-29 23:32:31 -08:00
parent 9cb7d8bcbb
commit 8fa011e2f4
4 changed files with 253 additions and 245 deletions

View File

@@ -1163,8 +1163,12 @@ SwaggerOperation.prototype.encodePathParam = function (pathParam) {
};
SwaggerOperation.prototype.urlify = function (args) {
var i, j, param;
var url = this.resource.basePath + this.pathJson();
var i, j, param, url;
// ensure no double slashing...
if(this.resource.basePath.length > 1 && this.resource.basePath.slice(-1) === '/' && this.pathJson().charAt(0) === '/')
url = this.resource.basePath + this.pathJson().substring(1);
else
url = this.resource.basePath + this.pathJson();
var params = this.parameters;
for (i = 0; i < params.length; i++) {
param = params[i];