apib2swagger 1.14.1 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/apib2swagger.js +6 -0
- package/package.json +1 -1
package/bin/apib2swagger.js
CHANGED
|
@@ -111,6 +111,12 @@ function processBlueprint(blueprint, opts) {
|
|
|
111
111
|
};
|
|
112
112
|
apib2swagger.convert(blueprint, options, function(error, result) {
|
|
113
113
|
if (error) {
|
|
114
|
+
if (error.stack && error.result) {
|
|
115
|
+
// override toString() of drafter's error to expand error.result.error.location
|
|
116
|
+
console.log(error.stack);
|
|
117
|
+
console.log(JSON.stringify(error.result, 0, 2));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
114
120
|
console.log(error);
|
|
115
121
|
return;
|
|
116
122
|
}
|