{"action":"created","issue":{"url":"https://api.github.com/repos/Yelp/bravado-core/issues/124","repository_url":"https://api.github.com/repos/Yelp/bravado-core","labels_url":"https://api.github.com/repos/Yelp/bravado-core/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/Yelp/bravado-core/issues/124/comments","events_url":"https://api.github.com/repos/Yelp/bravado-core/issues/124/events","html_url":"https://github.com/Yelp/bravado-core/pull/124","id":181365075,"number":124,"title":"Make Security Definition and Security Requirement as Python Objects","user":{"login":"macisamuele","id":6726359,"avatar_url":"https://avatars.githubusercontent.com/u/6726359?v=3","gravatar_id":"","url":"https://api.github.com/users/macisamuele","html_url":"https://github.com/macisamuele","followers_url":"https://api.github.com/users/macisamuele/followers","following_url":"https://api.github.com/users/macisamuele/following{/other_user}","gists_url":"https://api.github.com/users/macisamuele/gists{/gist_id}","starred_url":"https://api.github.com/users/macisamuele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macisamuele/subscriptions","organizations_url":"https://api.github.com/users/macisamuele/orgs","repos_url":"https://api.github.com/users/macisamuele/repos","events_url":"https://api.github.com/users/macisamuele/events{/privacy}","received_events_url":"https://api.github.com/users/macisamuele/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-06T09:27:12Z","updated_at":"2016-10-06T21:43:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Yelp/bravado-core/pulls/124","html_url":"https://github.com/Yelp/bravado-core/pull/124","diff_url":"https://github.com/Yelp/bravado-core/pull/124.diff","patch_url":"https://github.com/Yelp/bravado-core/pull/124.patch"},"body":"The goal of this PR is to target #123.\r\n\r\nAs @jlumpe the initial implementation of the security object added by PR #112 was not 100% compliant with the swagger specs. \r\n\r\nTo achieve a better matching of the specs I have created specific classes for [Security Definition](http://swagger.io/specification/#securityDefinitionsObject) and [Security Requirement](http://swagger.io/specification/#securityRequirementObject). In this way will be easier to integrate the handling of ``oauth2`` security format.\r\n\r\nMain differences:\r\n* ``security_objects`` property of ``operation`` is removed: the definition was incomplete and is replaced by ``security_requirements`` property which returns the list of Security Requirement objects\r\n* the parameters injected due to security specification cannot override parameters required by Path Object or Operation Object (is needed because different constraint could be injected) and are marked as optional parameters (because of the OR between different security requirements, check ``example3`` on issue #123)\r\n* ``unmarshal_request`` performs proper validation of security related parameters:\r\n    * checks that 1 and only one security requirement is matched\r\n    * in case of multiple security requirements are matched, checks that one matching security requirement is a superset of all the others (contains all the others, ie. ``example5`` on issue #123)\r\n\r\nI know that reviewing it could be hard ... so I added a _long_ set of tests to guarantee a good coverage of the modifications.\r\n\r\n**NOTE**: I'll update ``CHANGELOG.rst`` after the end of the review"},"comment":{"url":"https://api.github.com/repos/Yelp/bravado-core/issues/comments/252097453","html_url":"https://github.com/Yelp/bravado-core/pull/124#issuecomment-252097453","issue_url":"https://api.github.com/repos/Yelp/bravado-core/issues/124","id":252097453,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T21:43:07Z","updated_at":"2016-10-06T21:43:07Z","body":"\n[![Coverage Status](https://coveralls.io/builds/8223970/badge)](https://coveralls.io/builds/8223970)\n\nCoverage increased (+0.2%) to 97.523% when pulling **129b62a2fc1a16f25ed68b7747dbced7b3bd8158 on macisamuele:issue_123-security_object_definitions_and_security_handling_improvement** into **bea65fc9431c8911f3f505c246c365e6b3e9e524 on Yelp:master**.\n"}}
{"actor":{"display_login":"coveralls"}}