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