Description
Describe the bug
setup.py generated by --meta=setup
option creates a package at the wrong level.
Let's say you have an API my_api
:
open-python-client generate
Generated directory looks something like:
README.md my_api_client.egg-info setup.py
my_api_client pyproject.toml
The expectation is that you can do
from my_api_client import Client
after the package is installed.
However you can only do
import Client
because of the way setup.py is generated.
To Reproduce
Steps to reproduce the behavior:
- Run
openapi-python-client generate --path <path to your openapi.json file> --meta=setup
- cd into the generated directory
- pip install -e .
- cd to some other directory
python -c 'from import <your_api>_client import Client'
# this will fail withModuleNotFoundError: No module named <your_api>_client
Expected behavior
In order to allow the install of multiple openapi based python clients you should have to specify the open api python package to get a client.
OpenAPI Spec File
Any open API json should create this issue.
Desktop (please complete the following information):
- OS: mac os 11.6
- Python Version: 3.6.9
- openapi-python-client version: 0.10.5
Additional context
Add any other context about the problem here.