-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
response validator attempt to validate non swagger operations #56
Comments
theganyo
added a commit
that referenced
this issue
Nov 24, 2016
@theganyo do you have a timeframe for this to get pushed to NPM? I am also running into it. It's not deal breaking, but it is quite annoying (as I'm loading swagger-ui as well). |
Yup, same here. Please push to NPM. Thanks! |
Closed
You got it: swagger-node-runner@0.7.2 |
szilveszterb
added a commit
to exosite-archive/swagger-express
that referenced
this issue
May 18, 2017
A similar bug has been solved on the latest version: apigee-127/swagger-node-runner#56
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've a error handler set up
swaggerExpress.runner.on('responseValidationError', function(validationResponse, request, response) { ... }
and I'm also serving up the swagger-ui using static serve.
However the hookResponseForValidation fails with
TypeError: Cannot read property 'validateResponse' of undefined api_1 | at ServerResponse.hookEnd (/app/node_modules/swagger-node-runner/lib/connect_middleware.js:163:63)
as
operation
is undefined oncontext.request.swagger.operation.validateResponse
I'll submit a pull request shortly but the gist of the change is to filter out based on
if(context.request.swagger.operation == undefined){ debug('not a swagger operation, will not validate response'); }
The text was updated successfully, but these errors were encountered: