mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Lint fixes + getting older wrappers using new API correctly
This commit is contained in:
4
index.js
4
index.js
@@ -5,10 +5,10 @@ const SchemaPack = require('./lib/schemapack.js').SchemaPack;
|
||||
module.exports = {
|
||||
// Old API wrapping the new API
|
||||
convert: function(input, options, cb) {
|
||||
var schema = new SchemaPack(input);
|
||||
var schema = new SchemaPack(input, options);
|
||||
|
||||
if (schema.validated) {
|
||||
return schema.convert(options, cb);
|
||||
return schema.convert(cb);
|
||||
}
|
||||
|
||||
return cb(null, schema.validationResult);
|
||||
|
||||
Reference in New Issue
Block a user