Python codegen instance of incorrect indentation in `ApiClient.sanitize_for_serialization`.
The python code gen has an instance of incorrect indentation that is causing all API requests to fail.
In `api_client.ApiClient.sanitize_for_serialization`, the block of code that handles the case when `obj` is a dictionary is indented too far. Since python is whitespace sensitive, this causes this block to be scoped under the preceding if block, meaning it never runs. Execution falls off the edge of the function, resulting in a return value of None, which of course immediately throws an exception the second the value is accessed.
Re: Python codegen instance of incorrect indentation in `ApiClient.sanitize_for_serialization`.
I have reproduced this issue in Swaggerhub and opened a bug for it. As a workaround for now please manually correct the indentation until this issue is fixed. Also as an alternative you can use the swagger-codegen-cli version 2.2.3 on the command line which generates the correct indentation for this issue. Below is an example of usage to generate the Python client.