updated swagger-js for https://github.com/wordnik/swagger-js/issues/151
This commit is contained in:
@@ -1104,6 +1104,7 @@ var Property = function(name, obj, required) {
|
||||
this.description = obj.description;
|
||||
this.obj = obj;
|
||||
this.optional = true;
|
||||
this.default = obj.default || null;
|
||||
this.example = obj.example || null;
|
||||
}
|
||||
|
||||
@@ -1136,6 +1137,8 @@ Property.prototype.sampleValue = function(isArray, ignoredModels) {
|
||||
}
|
||||
else if(this.example)
|
||||
output = this.example;
|
||||
else if(this.default)
|
||||
output = this.default;
|
||||
else if(type === 'date-time')
|
||||
output = new Date().toISOString();
|
||||
else if(type === 'string')
|
||||
|
||||
Reference in New Issue
Block a user