added enum support per #296

This commit is contained in:
Tony Tam
2013-08-29 17:27:49 -07:00
parent 4fb5b86db1
commit 6c1de0b560
2 changed files with 14 additions and 0 deletions

7
dist/lib/swagger.js vendored
View File

@@ -551,6 +551,13 @@
this.valuesString = "'" + this.values.join("' or '") + "'";
}
}
if (obj["enum"] != null) {
this.valueType = "string";
this.values = obj["enum"];
if (this.values != null) {
this.valueString = "'" + this.values.join("' or '") + "'";
}
}
}
SwaggerModelProperty.prototype.getSampleValue = function(modelsToIgnore) {