Skip to content

Commit

Permalink
Do not attempt to valid non-swagger operations. Fixes apigee-127#56
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Nov 24, 2016
1 parent 29633cb commit 6f61ed8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/connect_middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ function hookResponseForValidation(context, eventEmitter) {
res.end = end;
if (written && data) {
debug('multiple writes, will not validate response');
} else if (!context.request.swagger.operation) {
debug('not a swagger operation, will not validate response');
} else {
debug('validating response');
try {
Expand Down

0 comments on commit 6f61ed8

Please sign in to comment.