fix for array params

This commit is contained in:
Tony Tam
2014-02-18 10:59:49 -08:00
parent b41b200061
commit 31e772f0bf
2 changed files with 6 additions and 0 deletions

3
dist/lib/swagger.js vendored
View File

@@ -622,6 +622,9 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
// for 1.1 compatibility // for 1.1 compatibility
var type = param.type || param.dataType; var type = param.type || param.dataType;
if(type === 'array') {
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
}
if(type.toLowerCase() === 'boolean') { if(type.toLowerCase() === 'boolean') {
param.allowableValues = {}; param.allowableValues = {};

View File

@@ -622,6 +622,9 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
// for 1.1 compatibility // for 1.1 compatibility
var type = param.type || param.dataType; var type = param.type || param.dataType;
if(type === 'array') {
type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']';
}
if(type.toLowerCase() === 'boolean') { if(type.toLowerCase() === 'boolean') {
param.allowableValues = {}; param.allowableValues = {};