Skip to content

Commit 9df9120

Browse files
authored
Merge pull request #90 from vishrutshah/chain-result
Chain result upto compare method
2 parents 6309aec + fe3b648 commit 9df9120

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
## 0.1.7
2+
Released on 2017-08-10.
3+
- Chaining the promises upto `compare` method and gracefully exiting application [#88](https://github.com/Azure/openapi-diff/issues/88)
4+
15
## 0.1.x
26
Released on 2017-07-18. All issues associated with this release can be found using this filter [Sprint-103](https://github.com/Azure/openapi-diff/issues?q=label%3ASprint-103+is%3Aclosed) [Sprint-104](https://github.com/Azure/openapi-diff/issues?utf8=%E2%9C%93&q=label%3ASprint-104%20is%3Aclosed)
37

48
#### Added
59
- Initial release of oad.
6-
- Added by [Vishrut Shah](https://github.com/vishrutshah).
10+
- Added by [Vishrut Shah](https://github.com/vishrutshah).

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### How to install
22
```
3-
npm install -g [email protected].6
3+
npm install -g [email protected].7
44
```
55

66
### Command Usage

lib/commands/oad.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ exports.handler = function (argv) {
2727
vOptions.logFilepath = argv.f;
2828
vOptions.json = argv.j;
2929

30-
return validate.compare(oldSpec, newSpec, vOptions);
30+
return validate.compare(oldSpec, newSpec, vOptions).then((result) => {
31+
console.log(result);
32+
}).catch(err => {
33+
console.log(err);
34+
process.exitCode = 1;
35+
});
3136
}
3237

3338
exports = module.exports;

lib/validators/openApiDiff.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ class OpenApiDiff {
6060
var promise2 = self.processViaAutoRest(newSwagger, 'new');
6161

6262
return Promise.all([promise1, promise2]).then(results => {
63-
return self.processViaOpenApiDiff(results[0], results[1]).then((result, error) => {
64-
console.log(result);
65-
})
66-
}).catch(err => {
67-
console.log(err);
68-
process.exit(1);
63+
return self.processViaOpenApiDiff(results[0], results[1]);
6964
});
7065
}
7166

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oad",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"author": {
55
"name": "Microsoft Corporation",
66
"email": "[email protected]",

0 commit comments

Comments
 (0)