added enum support per #296
This commit is contained in:
7
dist/lib/swagger.js
vendored
7
dist/lib/swagger.js
vendored
@@ -551,6 +551,13 @@
|
|||||||
this.valuesString = "'" + this.values.join("' or '") + "'";
|
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) {
|
SwaggerModelProperty.prototype.getSampleValue = function(modelsToIgnore) {
|
||||||
|
|||||||
@@ -551,6 +551,13 @@
|
|||||||
this.valuesString = "'" + this.values.join("' or '") + "'";
|
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) {
|
SwaggerModelProperty.prototype.getSampleValue = function(modelsToIgnore) {
|
||||||
|
|||||||
Reference in New Issue
Block a user