Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}, function(err, oas3Wrapper) {
if (err) {
return callback(err);
}
return OpenAPI2Postman.convert({
type: 'json',
data: oas3Wrapper.openapi
}, options, (error, result) => {
if (error) {
return callback('Error importing Swagger 2.0 spec');
}
else {
return callback(null, result);
}
});
});
}