Skip to content

Commit

Permalink
Merge pull request #90 from vishrutshah/chain-result
Browse files Browse the repository at this point in the history
Chain result upto compare method
  • Loading branch information
vishrutshah authored Aug 10, 2017
2 parents 6309aec + fe3b648 commit 9df9120
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 0.1.7
Released on 2017-08-10.
- Chaining the promises upto `compare` method and gracefully exiting application [#88](https://github.com/Azure/openapi-diff/issues/88)

## 0.1.x
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)

#### Added
- Initial release of oad.
- Added by [Vishrut Shah](https://github.com/vishrutshah).
- Added by [Vishrut Shah](https://github.com/vishrutshah).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### How to install
```
npm install -g [email protected].6
npm install -g [email protected].7
```

### Command Usage
Expand Down
7 changes: 6 additions & 1 deletion lib/commands/oad.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ exports.handler = function (argv) {
vOptions.logFilepath = argv.f;
vOptions.json = argv.j;

return validate.compare(oldSpec, newSpec, vOptions);
return validate.compare(oldSpec, newSpec, vOptions).then((result) => {
console.log(result);
}).catch(err => {
console.log(err);
process.exitCode = 1;
});
}

exports = module.exports;
7 changes: 1 addition & 6 deletions lib/validators/openApiDiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ class OpenApiDiff {
var promise2 = self.processViaAutoRest(newSwagger, 'new');

return Promise.all([promise1, promise2]).then(results => {
return self.processViaOpenApiDiff(results[0], results[1]).then((result, error) => {
console.log(result);
})
}).catch(err => {
console.log(err);
process.exit(1);
return self.processViaOpenApiDiff(results[0], results[1]);
});
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oad",
"version": "0.1.6",
"version": "0.1.7",
"author": {
"name": "Microsoft Corporation",
"email": "[email protected]",
Expand Down

0 comments on commit 9df9120

Please sign in to comment.