updated from swagger-js
This commit is contained in:
@@ -498,7 +498,7 @@
|
||||
}
|
||||
}
|
||||
o.nickname = this.sanitize(o.nickname);
|
||||
var op = new SwaggerOperation(o.nickname, resource_path, method, o.parameters, o.summary, o.notes, type, responseMessages, this, consumes, produces, o.authorizations);
|
||||
var op = new SwaggerOperation(o.nickname, resource_path, method, o.parameters, o.summary, o.notes, type, responseMessages, this, consumes, produces, o.authorizations, o.deprecated);
|
||||
this.operations[op.nickname] = op;
|
||||
output.push(this.operationsArray.push(op));
|
||||
}
|
||||
@@ -691,7 +691,7 @@
|
||||
return str;
|
||||
};
|
||||
|
||||
var SwaggerOperation = function (nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces, authorizations) {
|
||||
var SwaggerOperation = function (nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces, authorizations, deprecated) {
|
||||
var _this = this;
|
||||
|
||||
var errors = [];
|
||||
@@ -707,6 +707,7 @@
|
||||
this.consumes = consumes;
|
||||
this.produces = produces;
|
||||
this.authorizations = authorizations;
|
||||
this.deprecated = deprecated;
|
||||
this["do"] = __bind(this["do"], this);
|
||||
|
||||
if (errors.length > 0) {
|
||||
@@ -738,7 +739,7 @@
|
||||
}
|
||||
param.type = type;
|
||||
|
||||
if (type.toLowerCase() === 'boolean') {
|
||||
if (type && type.toLowerCase() === 'boolean') {
|
||||
param.allowableValues = {};
|
||||
param.allowableValues.values = ["true", "false"];
|
||||
}
|
||||
@@ -975,25 +976,12 @@
|
||||
var param = params[i];
|
||||
if (param.paramType === 'query') {
|
||||
if (args[param.name] !== undefined) {
|
||||
var value = args[param.name];
|
||||
if (queryParams !== '')
|
||||
queryParams += '&';
|
||||
if (Array.isArray(value)) {
|
||||
var j;
|
||||
var output = '';
|
||||
for(j = 0; j < value.length; j++) {
|
||||
if(j > 0)
|
||||
output += ',';
|
||||
output += encodeURIComponent(value[j]);
|
||||
}
|
||||
queryParams += encodeURIComponent(param.name) + '=' + output;
|
||||
}
|
||||
else {
|
||||
queryParams += "&";
|
||||
queryParams += encodeURIComponent(param.name) + '=' + encodeURIComponent(args[param.name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((queryParams != null) && queryParams.length > 0)
|
||||
url += '?' + queryParams;
|
||||
return url;
|
||||
|
||||
Reference in New Issue
Block a user