{"action":"opened","issue":{"url":"https://api.github.com/repos/zalando/connexion/issues/356","repository_url":"https://api.github.com/repos/zalando/connexion","labels_url":"https://api.github.com/repos/zalando/connexion/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/zalando/connexion/issues/356/comments","events_url":"https://api.github.com/repos/zalando/connexion/issues/356/events","html_url":"https://github.com/zalando/connexion/issues/356","id":192566959,"number":356,"title":"JSON serialize error on flask.Response objects","user":{"login":"heyglen","id":6285388,"avatar_url":"https://avatars.githubusercontent.com/u/6285388?v=3","gravatar_id":"","url":"https://api.github.com/users/heyglen","html_url":"https://github.com/heyglen","followers_url":"https://api.github.com/users/heyglen/followers","following_url":"https://api.github.com/users/heyglen/following{/other_user}","gists_url":"https://api.github.com/users/heyglen/gists{/gist_id}","starred_url":"https://api.github.com/users/heyglen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heyglen/subscriptions","organizations_url":"https://api.github.com/users/heyglen/orgs","repos_url":"https://api.github.com/users/heyglen/repos","events_url":"https://api.github.com/users/heyglen/events{/privacy}","received_events_url":"https://api.github.com/users/heyglen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-30T13:35:48Z","updated_at":"2016-11-30T13:35:48Z","closed_at":null,"body":"### Description\r\n\r\nJSON serialize error on flask.Response objects\r\n\r\n### Expected bahaviour\r\n\r\nFrom the [documentation](https://connexion.readthedocs.io/en/latest/response.html#response-serialization):\r\n\r\n> \"If the endpoint returns a Response object this response will be used as is.\"\r\n\r\n### Actual behaviour\r\n\r\nThe response is parsed in connexion.decorators.decorator.get_full_response() and the [response object itself is mistakenly set as the response's data instead of response.data](https://github.com/zalando/connexion/blob/master/connexion/decorators/decorator.py#L27):\r\n\r\nThis later throws a JSON serialize error when trying to [JSON serialize the data variable](https://github.com/zalando/connexion/blob/master/connexion/decorators/response.py#L47) (mistaken Response object)\r\n\r\n### Steps to reproduce\r\n\r\n\r\n\r\n### Additional info:\r\n\r\nOutput of the commands:\r\n\r\n- `python --version`\r\nPython 2.7.12\r\n- `pip show connexion | grep \"^Version\\:\"`\r\nVersion: 1.0.129\r\n"}}
{"actor":{"display_login":"heyglen"}}