swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.74k stars 6.02k forks source link

Issue while using Python swagger-codegen #8956

Open darshanmeel opened 5 years ago

darshanmeel commented 5 years ago
Description

I am not sure it is in fact an issue or more like some settings issue on my side.

I am getting below error while calling a get by code generated by swagger-codegen.

AttributeError: module 'swagger_client.models' has no attribute 'TokenResponse'

The swagger_client.models package has a module(file called token_response.py). This has the TokenResponse class, I could see that the same thing is used in petstore and it works but for me. It did not work and said that there is no attribute 'TokenResponse'.

I am using python 3.6.1.

I am sure I am missing something while executing otherwise this would have been the same issue with petstore (i did not test petstore) and people would have reported it. Do I need to do something special to achieve this.

Thanks

anasbk commented 5 years ago

same error, :(

magx2 commented 5 years ago

Same