Python client code fail due to ImportError
The module name and the class name differs in Python code which make it fail due to ImportError.
Fixed in https://github.com/swagger-api/swagger-codegen/pull/609
Hi, I am still facing the issue in python generated client code. Here, https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/python/api.mustache#L106
Example spec sample: { "type": "test_type", "method": "POST", "summary": "test_summary", "nickname": "test_nickname", "parameters": [ { "type": "string", "paramType": "path", "name": "name", "description": "test decription", "required": true, "allowMultiple": false }, { "type": "test_type", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false }
From the above spec, the returnType will be "test_type" but the model files created by swagger-codegen has name "Test_type.py" and model class named as "Test_type" so it failed to import so while deserializing.
I did a test locally with petstore by renaming Tag to tag_test. The model filename is correctly set to tag_test.py and the class name is also correct: class TagTest(object):
Were you testing with develop_2.0 branch?
I used the master.
Please test with develop_2.0 branch to see if the issue persists