swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
I am getting the following error when running flask server:
from .binary import Binary
File "/Users/ctippur/cyclops/cyclopscloud/flaskapi/cyclopsflaskglobal/python-flask-server/swagger_server/models/binary.py", line 4, in
from swagger_server.models.binary import Binary
Here is the tree for swagger server that got generated via swagger UI (http://editor.swagger.io)
Description
I am getting the following error when running flask server: from .binary import Binary File "/Users/ctippur/cyclops/cyclopscloud/flaskapi/cyclopsflaskglobal/python-flask-server/swagger_server/models/binary.py", line 4, in
from swagger_server.models.binary import Binary
Here is the tree for swagger server that got generated via swagger UI (http://editor.swagger.io)
├── Dockerfile ├── README.md ├── git_push.sh ├── requirements.txt ├── setup.py ├── swagger_server │ ├── init.py │ ├── main.py │ ├── pycache │ │ ├── init.cpython-36.pyc │ │ ├── main.cpython-36.pyc │ │ ├── encoder.cpython-36.pyc │ │ └── util.cpython-36.pyc │ ├── controllers │ │ ├── init.py │ │ └── default_controller.py │ ├── encoder.py │ ├── models │ │ ├── init.py │ │ ├── pycache │ │ │ ├── init.cpython-36.pyc │ │ │ ├── basemodel.cpython-36.pyc │ │ │ ├── binary.cpython-36.pyc │ │ │ └── body.cpython-36.pyc │ │ ├── basemodel.py │ │ ├── binary.py
Swagger-codegen version
I generated server code via http://editor.swagger.io
Swagger declaration file content or ur
Command line used for generation
N/A
Steps to reproduce
python3 -m venv flaskglobal source flaskglobal/bin/activate cp binary to flaskglobal and unzip contents cd python-flask-server pip install -r requirements.txt python -m swagger_server
Could this be a pythonpath issue?