added options for schemaFaker & reqName

This commit is contained in:
pavanteja-potnuru
2018-09-10 16:03:17 +05:30
parent a5dc21d81d
commit 2ee7be66f1
3 changed files with 19 additions and 12 deletions

View File

@@ -7,17 +7,17 @@ module.exports = {
convert: function(input, options, cb) {
try {
if (input.type === 'string') {
return convert(input.data, cb);
return convert(input.data, options, cb);
}
else if (input.type === 'json') {
return convert(input.data, cb);
return convert(input.data, options, cb);
}
else if (input.type === 'file') {
return fs.read(input.data, function(err, data) {
if (err) {
return cb(err);
}
return convert(data, cb);
return convert(data, options, cb);
});
}
return cb(null, {