diff --git a/bin/apib2swagger.js b/bin/apib2swagger.js index d09112b..346f951 100755 --- a/bin/apib2swagger.js +++ b/bin/apib2swagger.js @@ -111,6 +111,12 @@ function processBlueprint(blueprint, opts) { }; apib2swagger.convert(blueprint, options, function(error, result) { if (error) { + if (error.stack && error.result) { + // override toString() of drafter's error to expand error.result.error.location + console.log(error.stack); + console.log(JSON.stringify(error.result, 0, 2)); + return; + } console.log(error); return; } diff --git a/package.json b/package.json index fcb7d26..79174a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apib2swagger", - "version": "1.14.1", + "version": "1.14.2", "description": "Convert API Blueprint to Swagger.", "bin": "./bin/apib2swagger.js", "scripts": {