-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][Python] "sub-module" definition in packageName does not work #1658
Labels
Comments
Thanks for opening this issue! I have applied any relevant labels. |
Hello, btw this affects actual stable as well. generator version: openapi-generator-cli-3.3.4 wrong placed files / dirs:
Rgds, |
A similar issue has been reported in #1899 |
4 tasks
dojeda
added a commit
to quetz-al/quetzal-client
that referenced
this issue
Feb 15, 2019
Massive refactoring to put the autogenerated code outside the quetzal.client module, which breaks the weird module organization that did not permit to create meaningful synonyms/shortcuts on the quetzal/client/__init__.py file. One pending thought to keep in mind: should the autogenerated client live in a separate repo? For the moment, let's keep things together to avoid fragmentation. A fortunate side-effect of this refactoring is that the issue concerning the dots on the generated files (OpenAPITools/openapi-generator#1658) has been fixed; there is no need to manually rename files. Finally, a namespace package distribution strategy was chosen and implemented for the quetzal namespace. There are three strategies possible; the one used for quetzal will be "pkgutil-style namespace packages". See: https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
We define
"packageName": "myapi.rest.client"
in the config file for thepython
generator.This is because we want our REST API to de a submodule of the
myapi
.The generated code does not give us the expected code layout.
openapi-generator version
I used OpenAPI generator CLI version
4.0.0-SNAPSHOT
:https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/openapi-generator-cli-4.0.0-20181210.103357-85.jar
OpenAPI declaration file content or url
python-sub-module.yaml
:Command line used for generation
Steps to reproduce
python-sub-module.sh
:Related issues/PRs
Suggest a fix
Fixes in progress:
The text was updated successfully, but these errors were encountered: