I get:
Cannot read property 'type' of undefined
at
swagger_security.js line 81:
if (securityDefinition.type === 'oauth2') {
It appears req.swagger.operation.securityDefinitions is coming through undefined with an API-level security handler definition.
When I move the security definition to a single path in the yaml file, it works as expected. I'd prefer to not have to repeat the security definition for all paths individually if I can avoid it.
Using swagger-express-mw v0.7.0. I can't seem to get an API-level security handler to work on all routes.
swagger.yaml:
I get: Cannot read property 'type' of undefined at swagger_security.js line 81: if (securityDefinition.type === 'oauth2') {
It appears req.swagger.operation.securityDefinitions is coming through undefined with an API-level security handler definition.
When I move the security definition to a single path in the yaml file, it works as expected. I'd prefer to not have to repeat the security definition for all paths individually if I can avoid it.
Any ideas?