Namespace based client package generate #813
abhinavsingh
started this conversation in
Feature request
Replies: 1 comment
-
Example, if https://github.com/openapi-generators/openapi-python-client#project_name_override-and-package_name_override can also accept a dot separated package name to generate a namespace package e.g.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
Currently, default client directory and package names are picked up from the schema files. E.g. For schema titled "Company API", we get a directory named
company-api-client
with package name beingcompany_api_client
.Describe the solution you'd like
We follow a namespace based solution throughout our company code base i.e. instead of
from company_api_client import Client
, we would like to havefrom company.api.client import Client
. By doing so, generated package folder will also be compliant with our company GHA workflows and get automatically published to private pypi.It's mostly a matter of creating those directories within directories without any
__init__.py
so that they get recognized as namespace. Some changes to thepyproject.toml
and poetry config may also be needed. While I am able to overridepyproject.toml
templates, I am unable to find a way to customize the directory structure.Is there a possibility to restructure the generated directories as explained above without forking/changing the core.
Best
Beta Was this translation helpful? Give feedback.
All reactions