Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cyclosproject/ng-swagger-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Fernando Planella Gonzalez committed Jul 1, 2019
2 parents ded5879 + 0ecf1de commit 7800752
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions ng-swagger-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -1229,16 +1229,18 @@ function processServices(swagger, models, options) {
var op = service.serviceOperations[i];
for (var code in op.operationResponses) {
var status = Number(code);
var actualDeps = (status < 200 || status >= 300)
? errorDependencies : dependencies;
var response = op.operationResponses[code];
if (response.type) {
var type = response.type;
if (type && type.allTypes) {
// This is an inline object. Append all types
type.allTypes.forEach(t => actualDeps.add(t));
} else {
actualDeps.add(type);
if (!isNaN(status)) {
var actualDeps = (status < 200 || status >= 300)
? errorDependencies : dependencies;
var response = op.operationResponses[code];
if (response && response.type) {
var type = response.type;
if (type && type.allTypes) {
// This is an inline object. Append all types
type.allTypes.forEach(t => actualDeps.add(t));
} else {
actualDeps.add(type);
}
}
}
}
Expand Down

0 comments on commit 7800752

Please sign in to comment.