{"action":"created","comment":{"url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/comments/97449098","pull_request_review_id":18059367,"id":97449098,"diff_hunk":"@@ -506,17 +506,23 @@ def from_schema_mapping(self, schema_mapping):\n \n             for field_schema in response_schema.children:\n                 location = field_schema.name\n+\n                 if location == 'body':\n                     title = field_schema.__class__.__name__\n                     if title == 'body':\n                         title = response_schema.__class__.__name__ + 'Body'\n                     field_schema.title = title\n-\n                     response['schema'] = self.definitions.from_schema(field_schema)\n+\n                 elif location == 'header':\n-                    headers = convert_schema(field_schema)\n-                    if 'properties' in headers:\n-                        response['headers'] = headers['properties']\n+                    header_schema = convert_schema(field_schema)\n+                    headers = header_schema.get('properties')\n+                    if headers:\n+                        # Response headers doesn't accept titles\n+                        for header in headers.values():\n+                            header.pop('title')","path":"cornice_swagger/swagger.py","position":22,"original_position":22,"commit_id":"6edea04d5cb6f2c44314ea5b6d033f6e250640e6","original_commit_id":"6edea04d5cb6f2c44314ea5b6d033f6e250640e6","user":{"login":"glasserc","id":17006,"avatar_url":"https://avatars.githubusercontent.com/u/17006?v=3","gravatar_id":"","url":"https://api.github.com/users/glasserc","html_url":"https://github.com/glasserc","followers_url":"https://api.github.com/users/glasserc/followers","following_url":"https://api.github.com/users/glasserc/following{/other_user}","gists_url":"https://api.github.com/users/glasserc/gists{/gist_id}","starred_url":"https://api.github.com/users/glasserc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasserc/subscriptions","organizations_url":"https://api.github.com/users/glasserc/orgs","repos_url":"https://api.github.com/users/glasserc/repos","events_url":"https://api.github.com/users/glasserc/events{/privacy}","received_events_url":"https://api.github.com/users/glasserc/received_events","type":"User","site_admin":false},"body":"Oh, I understand now. The code that tries to turn Colander schemas into Swagger schemas is ignorant of where in the hierarchy the Colander schema is, and just copies `title` if it's available. I think the tests are fine as they are. I'm not crazy about code that has to delete `title` if it's in the wrong place. Where is `title` legal? Only on the root schema? If that's true, can we remove it from the `converters` package and just put it in the `CorniceSwagger` class?","created_at":"2017-01-24T00:21:41Z","updated_at":"2017-01-24T00:21:41Z","html_url":"https://github.com/Cornices/cornice.ext.swagger/pull/53#discussion_r97449098","pull_request_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/comments/97449098"},"html":{"href":"https://github.com/Cornices/cornice.ext.swagger/pull/53#discussion_r97449098"},"pull_request":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53","id":102708724,"html_url":"https://github.com/Cornices/cornice.ext.swagger/pull/53","diff_url":"https://github.com/Cornices/cornice.ext.swagger/pull/53.diff","patch_url":"https://github.com/Cornices/cornice.ext.swagger/pull/53.patch","issue_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/53","number":53,"state":"closed","locked":false,"title":"Remove invalid title field from response header properties","user":{"login":"gabisurita","id":4023375,"avatar_url":"https://avatars.githubusercontent.com/u/4023375?v=3","gravatar_id":"","url":"https://api.github.com/users/gabisurita","html_url":"https://github.com/gabisurita","followers_url":"https://api.github.com/users/gabisurita/followers","following_url":"https://api.github.com/users/gabisurita/following{/other_user}","gists_url":"https://api.github.com/users/gabisurita/gists{/gist_id}","starred_url":"https://api.github.com/users/gabisurita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabisurita/subscriptions","organizations_url":"https://api.github.com/users/gabisurita/orgs","repos_url":"https://api.github.com/users/gabisurita/repos","events_url":"https://api.github.com/users/gabisurita/events{/privacy}","received_events_url":"https://api.github.com/users/gabisurita/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-01-23T12:22:37Z","updated_at":"2017-01-24T00:21:41Z","closed_at":"2017-01-23T13:37:08Z","merged_at":"2017-01-23T13:37:08Z","merge_commit_sha":"f0114a570cd6b9797f3834978953671696e06260","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53/commits","review_comments_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53/comments","review_comment_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/53/comments","statuses_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/statuses/6edea04d5cb6f2c44314ea5b6d033f6e250640e6","head":{"label":"Cornices:fix-response-headers","ref":"fix-response-headers","sha":"6edea04d5cb6f2c44314ea5b6d033f6e250640e6","user":{"login":"Cornices","id":22174083,"avatar_url":"https://avatars.githubusercontent.com/u/22174083?v=3","gravatar_id":"","url":"https://api.github.com/users/Cornices","html_url":"https://github.com/Cornices","followers_url":"https://api.github.com/users/Cornices/followers","following_url":"https://api.github.com/users/Cornices/following{/other_user}","gists_url":"https://api.github.com/users/Cornices/gists{/gist_id}","starred_url":"https://api.github.com/users/Cornices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cornices/subscriptions","organizations_url":"https://api.github.com/users/Cornices/orgs","repos_url":"https://api.github.com/users/Cornices/repos","events_url":"https://api.github.com/users/Cornices/events{/privacy}","received_events_url":"https://api.github.com/users/Cornices/received_events","type":"Organization","site_admin":false},"repo":{"id":71356982,"name":"cornice.ext.swagger","full_name":"Cornices/cornice.ext.swagger","owner":{"login":"Cornices","id":22174083,"avatar_url":"https://avatars.githubusercontent.com/u/22174083?v=3","gravatar_id":"","url":"https://api.github.com/users/Cornices","html_url":"https://github.com/Cornices","followers_url":"https://api.github.com/users/Cornices/followers","following_url":"https://api.github.com/users/Cornices/following{/other_user}","gists_url":"https://api.github.com/users/Cornices/gists{/gist_id}","starred_url":"https://api.github.com/users/Cornices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cornices/subscriptions","organizations_url":"https://api.github.com/users/Cornices/orgs","repos_url":"https://api.github.com/users/Cornices/repos","events_url":"https://api.github.com/users/Cornices/events{/privacy}","received_events_url":"https://api.github.com/users/Cornices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cornices/cornice.ext.swagger","description":"Swagger extension for Cornice","fork":false,"url":"https://api.github.com/repos/Cornices/cornice.ext.swagger","forks_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/forks","keys_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/teams","hooks_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/hooks","issue_events_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/events{/number}","events_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/events","assignees_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/assignees{/user}","branches_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/branches{/branch}","tags_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/tags","blobs_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/statuses/{sha}","languages_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/languages","stargazers_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/stargazers","contributors_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/contributors","subscribers_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/subscribers","subscription_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/subscription","commits_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/contents/{+path}","compare_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/merges","archive_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/downloads","issues_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues{/number}","pulls_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls{/number}","milestones_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/milestones{/number}","notifications_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/labels{/name}","releases_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/releases{/id}","deployments_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/deployments","created_at":"2016-10-19T12:54:47Z","updated_at":"2017-01-23T22:54:40Z","pushed_at":"2017-01-23T22:36:08Z","git_url":"git://github.com/Cornices/cornice.ext.swagger.git","ssh_url":"git@github.com:Cornices/cornice.ext.swagger.git","clone_url":"https://github.com/Cornices/cornice.ext.swagger.git","svn_url":"https://github.com/Cornices/cornice.ext.swagger","homepage":null,"size":536,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":15,"forks":4,"open_issues":15,"watchers":4,"default_branch":"master"}},"base":{"label":"Cornices:master","ref":"master","sha":"d06060ca0c50e25de234187d09cc79279d9a63d7","user":{"login":"Cornices","id":22174083,"avatar_url":"https://avatars.githubusercontent.com/u/22174083?v=3","gravatar_id":"","url":"https://api.github.com/users/Cornices","html_url":"https://github.com/Cornices","followers_url":"https://api.github.com/users/Cornices/followers","following_url":"https://api.github.com/users/Cornices/following{/other_user}","gists_url":"https://api.github.com/users/Cornices/gists{/gist_id}","starred_url":"https://api.github.com/users/Cornices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cornices/subscriptions","organizations_url":"https://api.github.com/users/Cornices/orgs","repos_url":"https://api.github.com/users/Cornices/repos","events_url":"https://api.github.com/users/Cornices/events{/privacy}","received_events_url":"https://api.github.com/users/Cornices/received_events","type":"Organization","site_admin":false},"repo":{"id":71356982,"name":"cornice.ext.swagger","full_name":"Cornices/cornice.ext.swagger","owner":{"login":"Cornices","id":22174083,"avatar_url":"https://avatars.githubusercontent.com/u/22174083?v=3","gravatar_id":"","url":"https://api.github.com/users/Cornices","html_url":"https://github.com/Cornices","followers_url":"https://api.github.com/users/Cornices/followers","following_url":"https://api.github.com/users/Cornices/following{/other_user}","gists_url":"https://api.github.com/users/Cornices/gists{/gist_id}","starred_url":"https://api.github.com/users/Cornices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cornices/subscriptions","organizations_url":"https://api.github.com/users/Cornices/orgs","repos_url":"https://api.github.com/users/Cornices/repos","events_url":"https://api.github.com/users/Cornices/events{/privacy}","received_events_url":"https://api.github.com/users/Cornices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cornices/cornice.ext.swagger","description":"Swagger extension for Cornice","fork":false,"url":"https://api.github.com/repos/Cornices/cornice.ext.swagger","forks_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/forks","keys_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/teams","hooks_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/hooks","issue_events_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/events{/number}","events_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/events","assignees_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/assignees{/user}","branches_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/branches{/branch}","tags_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/tags","blobs_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/statuses/{sha}","languages_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/languages","stargazers_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/stargazers","contributors_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/contributors","subscribers_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/subscribers","subscription_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/subscription","commits_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/contents/{+path}","compare_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/merges","archive_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/downloads","issues_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues{/number}","pulls_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls{/number}","milestones_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/milestones{/number}","notifications_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/labels{/name}","releases_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/releases{/id}","deployments_url":"https://api.github.com/repos/Cornices/cornice.ext.swagger/deployments","created_at":"2016-10-19T12:54:47Z","updated_at":"2017-01-23T22:54:40Z","pushed_at":"2017-01-23T22:36:08Z","git_url":"git://github.com/Cornices/cornice.ext.swagger.git","ssh_url":"git@github.com:Cornices/cornice.ext.swagger.git","clone_url":"https://github.com/Cornices/cornice.ext.swagger.git","svn_url":"https://github.com/Cornices/cornice.ext.swagger","homepage":null,"size":536,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":15,"forks":4,"open_issues":15,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53"},"html":{"href":"https://github.com/Cornices/cornice.ext.swagger/pull/53"},"issue":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/53"},"comments":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/Cornices/cornice.ext.swagger/statuses/6edea04d5cb6f2c44314ea5b6d033f6e250640e6"}}}}
{"actor":{"display_login":"glasserc"}}