Skip to content

Commit

Permalink
Merge pull request #135 from swisspush/develop
Browse files Browse the repository at this point in the history
Release 0.9.1
  • Loading branch information
Mattiamato authored Jun 11, 2020
2 parents 3048fc4 + 691a0e1 commit ab7d216
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apikana",
"version": "0.9.0",
"version": "0.9.1",
"description": "Integrated tools for REST API design - アピ",
"main": "index.js",
"bin": {
Expand Down
8 changes: 4 additions & 4 deletions src/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ module.exports = {
},
function (err) {
log.error('Error in', colors.green(name), colors.red(err));
});
});
}
return result;
});
Expand Down Expand Up @@ -494,8 +494,9 @@ module.exports = {

task('generate-full-rest', ['prepare-complete-api'], function () {
traverse.forEach(completeApi, function (value) {
if (this.key === '$ref' && fileToType[value]) {
this.update('#/definitions/' + fileToType[value]);
if (this.key === '$ref' && !value.startsWith("#/definitions")) {
var type = fileToType[path.parse(value).base];
this.update('#/definitions/' + type);
}
});
var out = path.resolve(dest, 'model/openapi');
Expand Down Expand Up @@ -558,4 +559,3 @@ module.exports = {
done ? gulp.start(done) : gulp.start();
}
};

0 comments on commit ab7d216

Please sign in to comment.