updated js libs

This commit is contained in:
Tony Tam
2014-11-10 23:19:14 -08:00
parent d1d2bc75db
commit 8e20a32344
5 changed files with 113 additions and 35 deletions

View File

@@ -420,6 +420,9 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
if(typeof response.paths[path] === 'object') {
var httpMethod;
for(httpMethod in response.paths[path]) {
if(['delete', 'get', 'head', 'options', 'patch', 'post', 'put'].indexOf(httpMethod) === -1) {
continue;
}
var operation = response.paths[path][httpMethod];
var tags = operation.tags;
if(typeof tags === 'undefined') {
@@ -556,7 +559,7 @@ var Operation = function(parent, operationId, httpMethod, path, args, definition
param.allowMultiple = true;
}
var innerType = this.getType(param);
if(innerType.toString().toLowerCase() === 'boolean') {
if(innerType && innerType.toString().toLowerCase() === 'boolean') {
param.allowableValues = {};
param.isList = true;
param.enum = ["true", "false"];