{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3558","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3558/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3558/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3558/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3558","id":169974427,"number":3558,"title":"[Python] Add support for POST-Redirect-GET with Deserialization","user":{"login":"driverpt","id":1164534,"avatar_url":"https://avatars.githubusercontent.com/u/1164534?v=3","gravatar_id":"","url":"https://api.github.com/users/driverpt","html_url":"https://github.com/driverpt","followers_url":"https://api.github.com/users/driverpt/followers","following_url":"https://api.github.com/users/driverpt/following{/other_user}","gists_url":"https://api.github.com/users/driverpt/gists{/gist_id}","starred_url":"https://api.github.com/users/driverpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driverpt/subscriptions","organizations_url":"https://api.github.com/users/driverpt/orgs","repos_url":"https://api.github.com/users/driverpt/repos","events_url":"https://api.github.com/users/driverpt/events{/privacy}","received_events_url":"https://api.github.com/users/driverpt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Client:%20Python","name":"Client: Python","color":"fad8c7"},{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Issue:%20Bug","name":"Issue: Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/13","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.2.2","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/13/labels","id":1928763,"number":13,"title":"v2.2.2","description":"","creator":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"open_issues":193,"closed_issues":5,"state":"open","created_at":"2016-08-08T09:16:56Z","updated_at":"2016-08-09T02:25:15Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-08-08T17:07:23Z","updated_at":"2016-08-09T02:27:24Z","closed_at":null,"body":"##### Description\r\n\r\nHello, we've been testing the swagger-codegen from editor.swagger.io for Python Client and we noticed that a POST-Redirect-GET generates the Client Stub with response_type=None instead of the correct type.\r\n\r\nI don't know if this is by design or if it's a bug\r\n\r\n##### Swagger-codegen version\r\n\r\n2.2.0\r\n\r\n##### Swagger declaration file content or url\r\n\r\n```\r\n---\r\nswagger: \"2.0\"\r\ninfo:\r\n  description: \"Foo\"\r\n  version: \"v1\"\r\n  title: \"Bar\"\r\n  termsOfService: \"http://terms\"\r\nhost: \"localhost:8080\"\r\nbasePath: \"/api\"\r\ntags:\r\n- name: \"foo\"\r\n  description: \"bar\"\r\nschemes:\r\n- \"http\"\r\n- \"https\"\r\npaths:\r\n  /foo:\r\n    post:\r\n      tags:\r\n      - \"foo\"\r\n      summary: \"Creates a new Foo Object\"\r\n      description: \"\"\r\n      operationId: \"createFoo\"\r\n      consumes:\r\n      - \"application/json\"\r\n      produces:\r\n      - \"application/json\"\r\n      parameters:\r\n      - in: \"body\"\r\n        name: \"Foo\"\r\n        description: \"Foo Data for creation\"\r\n        required: true\r\n        schema:\r\n          $ref: \"#/definitions/FooBarData\"\r\n      responses:\r\n        303:\r\n          description: \"Redirects to created Foo URL\"\r\n        404:\r\n          description: \"Invalid data\"\r\n  /foo/{id}:\r\n    get:\r\n      tags:\r\n      - \"foo\"\r\n      summary: \"Gets a Foo entry by Id\"\r\n      description: \"\"\r\n      operationId: \"getFooById\"\r\n      consumes:\r\n      - \"application/json\"\r\n      produces:\r\n      - \"application/json\"\r\n      parameters:\r\n      - name: \"id\"\r\n        in: \"path\"\r\n        description: \"id\"\r\n        required: true\r\n        type: \"string\"\r\n        format: \"uuid\"\r\n      responses:\r\n        200:\r\n          description: \"The Foo\"\r\n          schema:\r\n            $ref: \"#/definitions/FooResult\"\r\n        400:\r\n          description: \"Invalid UUID format\"\r\n        404:\r\n          description: \"Foo not found\"\r\ndefinitions:\r\n  FooBarData:\r\n    type: \"object\"\r\n    properties:\r\n      name:\r\n        type: \"string\"\r\n        minLength: 1\r\n        maxLength: 256\r\n      description:\r\n        type: \"string\"\r\n  FooResult:\r\n    type: \"object\"\r\n    properties:\r\n      id:\r\n        type: \"string\"\r\n        format: \"uuid\"\r\n      name:\r\n        type: \"string\"\r\n      description:\r\n        type: \"string\"\r\n```\r\n\r\n##### Command line used for generation\r\n\r\nswagger-codegen generate -i swagger.yaml -l python -o /tmp/test\r\n\r\n##### Steps to reproduce\r\n\r\nJust call FooApi.create_foo() with FooData() and you'll notice that on the self.api_client.call_api within the `create_foo_with_http_info` method the `response_type=None`\r\n\r\n##### Related issues\r\n\r\n##### Suggest a Fix\r\n\r\nIf it's redirected to another known Endpoint, it should Infer the returned Types/Deserialized Objects"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/238435832","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3558#issuecomment-238435832","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3558","id":238435832,"user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T02:27:24Z","updated_at":"2016-08-09T02:27:24Z","body":"@driverpt I don't think the Python API client supports URL redirection at the moment.\r\n\r\ncc @scottrw93 "}}
{"actor":{"display_login":"wing328"}}