fixes for allowable values

This commit is contained in:
Tony Tam
2014-02-16 08:26:38 -08:00
parent 65a5bc34eb
commit b41b200061
3 changed files with 10 additions and 10 deletions

8
dist/lib/swagger.js vendored
View File

@@ -1,5 +1,5 @@
// swagger.js // swagger.js
// version 2.0.15 // version 2.0.16
var __bind = function(fn, me){ var __bind = function(fn, me){
return function(){ return function(){
@@ -636,7 +636,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
param.allowableValues = {}; param.allowableValues = {};
param.allowableValues.descriptiveValues = []; param.allowableValues.descriptiveValues = [];
for(j = 0; j < enumValue.length; j++) { for(var j = 0; j < enumValue.length; j++) {
var v = enumValue[j]; var v = enumValue[j];
if(param.defaultValue != null) { if(param.defaultValue != null) {
param.allowableValues.descriptiveValues.push ({ param.allowableValues.descriptiveValues.push ({
@@ -652,7 +652,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
} }
} }
} }
if(param.allowableValues != null) { else if(param.allowableValues != null) {
if(param.allowableValues.valueType === "RANGE") if(param.allowableValues.valueType === "RANGE")
param.isRange = true; param.isRange = true;
else else
@@ -660,7 +660,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
if(param.allowableValues != null) { if(param.allowableValues != null) {
param.allowableValues.descriptiveValues = []; param.allowableValues.descriptiveValues = [];
if(param.allowableValues.values) { if(param.allowableValues.values) {
for(j = 0; j < param.allowableValues.values.length; j++){ for(var j = 0; j < param.allowableValues.values.length; j++){
var v = param.allowableValues.values[j]; var v = param.allowableValues.values[j];
if(param.defaultValue != null) { if(param.defaultValue != null) {
param.allowableValues.descriptiveValues.push ({ param.allowableValues.descriptiveValues.push ({

View File

@@ -1,5 +1,5 @@
// swagger.js // swagger.js
// version 2.0.15 // version 2.0.16
var __bind = function(fn, me){ var __bind = function(fn, me){
return function(){ return function(){
@@ -636,7 +636,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
param.allowableValues = {}; param.allowableValues = {};
param.allowableValues.descriptiveValues = []; param.allowableValues.descriptiveValues = [];
for(j = 0; j < enumValue.length; j++) { for(var j = 0; j < enumValue.length; j++) {
var v = enumValue[j]; var v = enumValue[j];
if(param.defaultValue != null) { if(param.defaultValue != null) {
param.allowableValues.descriptiveValues.push ({ param.allowableValues.descriptiveValues.push ({
@@ -652,7 +652,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
} }
} }
} }
if(param.allowableValues != null) { else if(param.allowableValues != null) {
if(param.allowableValues.valueType === "RANGE") if(param.allowableValues.valueType === "RANGE")
param.isRange = true; param.isRange = true;
else else
@@ -660,7 +660,7 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
if(param.allowableValues != null) { if(param.allowableValues != null) {
param.allowableValues.descriptiveValues = []; param.allowableValues.descriptiveValues = [];
if(param.allowableValues.values) { if(param.allowableValues.values) {
for(j = 0; j < param.allowableValues.values.length; j++){ for(var j = 0; j < param.allowableValues.values.length; j++){
var v = param.allowableValues.values[j]; var v = param.allowableValues.values[j];
if(param.defaultValue != null) { if(param.defaultValue != null) {
param.allowableValues.descriptiveValues.push ({ param.allowableValues.descriptiveValues.push ({

View File

@@ -1,6 +1,6 @@
{ {
"name": "swagger-ui", "name": "swagger-ui",
"version": "2.0.9", "version": "2.0.10",
"description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API", "description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
"scripts": { "scripts": {
"build": "PATH=$PATH:./node_modules/.bin cake dist", "build": "PATH=$PATH:./node_modules/.bin cake dist",
@@ -19,7 +19,7 @@
"readmeFilename": "README.md", "readmeFilename": "README.md",
"dependencies": { "dependencies": {
"coffee-script": "~1.5.0", "coffee-script": "~1.5.0",
"swagger-client": "2.0.14", "swagger-client": "2.0.16",
"handlebars": "~1.0.10", "handlebars": "~1.0.10",
"less": "~1.4.2" "less": "~1.4.2"
} }