Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 existing application [#88](https://github.com/Azure/openapi-diff/issues/88)
Copy link

@amarzavery amarzavery Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exi s ting


## 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: 2 additions & 5 deletions lib/validators/openApiDiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@ class OpenApiDiff {

return Promise.all([promise1, promise2]).then(results => {
return self.processViaOpenApiDiff(results[0], results[1]).then((result, error) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return Promise.all([promise1, promise2]).then(results => { 
  return self.processViaOpenApiDiff(results[0], results[1]); //this is already returning a promise, so need to chain a redundant `.then()` to it
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

console.log(result);
})
}).catch(err => {
console.log(err);
process.exit(1);
return Promise.resolve(result);
});
});
}

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