{"action":"closed","issue":{"url":"https://api.github.com/repos/theganyo/swagger-node-runner/issues/53","repository_url":"https://api.github.com/repos/theganyo/swagger-node-runner","labels_url":"https://api.github.com/repos/theganyo/swagger-node-runner/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/theganyo/swagger-node-runner/issues/53/comments","events_url":"https://api.github.com/repos/theganyo/swagger-node-runner/issues/53/events","html_url":"https://github.com/theganyo/swagger-node-runner/issues/53","id":170198187,"number":53,"title":"Existing security handler broken after upgrade to Sway 1.0 based release","user":{"login":"tanzim","id":1591642,"avatar_url":"https://avatars.githubusercontent.com/u/1591642?v=3","gravatar_id":"","url":"https://api.github.com/users/tanzim","html_url":"https://github.com/tanzim","followers_url":"https://api.github.com/users/tanzim/followers","following_url":"https://api.github.com/users/tanzim/following{/other_user}","gists_url":"https://api.github.com/users/tanzim/gists{/gist_id}","starred_url":"https://api.github.com/users/tanzim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanzim/subscriptions","organizations_url":"https://api.github.com/users/tanzim/orgs","repos_url":"https://api.github.com/users/tanzim/repos","events_url":"https://api.github.com/users/tanzim/events{/privacy}","received_events_url":"https://api.github.com/users/tanzim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theganyo/swagger-node-runner/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"theganyo","id":772731,"avatar_url":"https://avatars.githubusercontent.com/u/772731?v=3","gravatar_id":"","url":"https://api.github.com/users/theganyo","html_url":"https://github.com/theganyo","followers_url":"https://api.github.com/users/theganyo/followers","following_url":"https://api.github.com/users/theganyo/following{/other_user}","gists_url":"https://api.github.com/users/theganyo/gists{/gist_id}","starred_url":"https://api.github.com/users/theganyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theganyo/subscriptions","organizations_url":"https://api.github.com/users/theganyo/orgs","repos_url":"https://api.github.com/users/theganyo/repos","events_url":"https://api.github.com/users/theganyo/events{/privacy}","received_events_url":"https://api.github.com/users/theganyo/received_events","type":"User","site_admin":false},"assignees":[{"login":"theganyo","id":772731,"avatar_url":"https://avatars.githubusercontent.com/u/772731?v=3","gravatar_id":"","url":"https://api.github.com/users/theganyo","html_url":"https://github.com/theganyo","followers_url":"https://api.github.com/users/theganyo/followers","following_url":"https://api.github.com/users/theganyo/following{/other_user}","gists_url":"https://api.github.com/users/theganyo/gists{/gist_id}","starred_url":"https://api.github.com/users/theganyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theganyo/subscriptions","organizations_url":"https://api.github.com/users/theganyo/orgs","repos_url":"https://api.github.com/users/theganyo/repos","events_url":"https://api.github.com/users/theganyo/events{/privacy}","received_events_url":"https://api.github.com/users/theganyo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-08-09T15:34:31Z","updated_at":"2016-08-10T20:07:11Z","closed_at":"2016-08-10T20:07:11Z","body":"Hi,\r\nFirstly congrats on the Sway 1.0 based release. Much appreciated. It seems that after the release, my existing security handlers are no longer working.\r\n\r\nPre-upgrade `npm ls` shows I had been using:\r\nswagger-express-mw@0.6.0\r\nswagger-node-runner@0.6.16\r\nsway@0.6.0\r\n\r\nI should mention that I was using API level security instead of specifying security per route, i.e. in my `swagger.yaml` file I had:\r\n\r\n```yaml\r\n# API security. Applies to all routes\r\nsecurity:\r\n  - BasicAuth: []\r\n# Routes\r\npaths:\r\n  /stars/{starId}/accounts:\r\n    x-swagger-router-controller: star-controller\r\n    get:\r\n      description: Returns accounts for a star identified by it's id\r\n...\r\n# API security definition\r\nsecurityDefinitions:\r\n  BasicAuth:\r\n    type: basic\r\n```\r\n\r\nPost upgrade, I'm using:\r\nswagger-express-mw@0.7.0\r\nswagger-node-runner@0.7.0\r\nsway@1.0.0\r\n\r\nLooking at the security fitting[1] it seems that `operation` comes back as `undefined` and this suggests that support for API level security has somehow been broken.\r\n\r\nI've currently worked around by specifying operation level security for each route and that's fine, but I wanted to highlight this nevertheless as API level security is part of the spec and should be supported.  \r\n\r\n[1] https://github.com/theganyo/swagger-node-runner/blob/master/fittings/swagger_security.js#L32\r\n"}}
{"actor":{"display_login":"theganyo"}}