Skip to content
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

Python Client Generation #2945

Closed
joe-hannes opened this issue Feb 11, 2024 · 1 comment · Fixed by #2956
Closed

Python Client Generation #2945

joe-hannes opened this issue Feb 11, 2024 · 1 comment · Fixed by #2956

Comments

@joe-hannes
Copy link

joe-hannes commented Feb 11, 2024

Tandoor Version

1.5.11

Setup

Docker / Docker-Compose

Reverse Proxy

No reverse proxy

Other

No response

Bug description

When trying to generate a python client with the OpenApi Generator a faulty client is generated.

Reproduction:

sudo docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate     -i <ip_addr:port>/openapi/?format=openapi-json     -g python     -o /local/out/python
  • cd into generated open_api client/api
  • pip install .
  • start a python session and import openapi_client

Relevant logs

Python 3.12.1 (main, Jan  4 2024, 09:41:05) [GCC 13.2.1 20231014] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openapi_client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/config/pyscript/out/python/openapi_client/__init__.py", line 20, in <module>
    from openapi_client.api.api_api import ApiApi
  File "/config/pyscript/out/python/openapi_client/api/__init__.py", line 4, in <module>
    from openapi_client.api.api_api import ApiApi
  File "/config/pyscript/out/python/openapi_client/api/api_api.py", line 35, in <module>
    from openapi_client.models.int import Int
ModuleNotFoundError: No module named 'openapi_client.models.int'
@smilerz
Copy link
Collaborator

smilerz commented Feb 11, 2024

If you identify that the root cause please open a PR or an issue identifying exactly what needs to be changed.

@smilerz smilerz closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants