-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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] setup.py incorrect using python or python-pydantic-v1 generators when no paths are specified #20090
Comments
I have found the problem I think, the paths property is not present in my openapi.yaml because I don't need any APIs for now. I just need the models to be generated. It should also work without paths property in the yaml. Trying to fix the problem in a PR. |
thanks for providing the steps to reproduce the issue but I couldn't repeat it as i'm using Poetry (version 1.8.4).
|
Could you print out your testpoetry/pyproject.toml please. |
|
Could you show me your openapi.yaml |
i used the one you provided above:
did you test it in another machine or environment to see if the issue is caused by something else? |
Well, so I guess that the setup.py generated on your side contains the method setup right ? |
that's what i got
|
can you please give it another try with the latest master (which is what i used in this test)? |
Will try this on monday |
Just sent you the tar.gz of my test. My poetry version is 1.8.4. I did the following commands :
I got the same log issue :
|
thanks for the info did you test the fix (PR) locally (build the CLI JAR and test with the spec)? |
Nope will do it asap |
Ok done I have done these actions :
I got
|
Bug Report Checklist
Description
I generate a python client based on my really simple openapi.yaml.
But the setup.py that is generated does not contain the setup() method.
So it is not possible to import this library with poetry or pip.
openapi-generator version
7.9.0 but it seems to have the same issue on 7.0.0
OpenAPI declaration file content or url
Generation Details
openapi-generator-cli generate -i openapi.yaml -g python -o ./generated-python-client
Steps to reproduce
openapi-generator-cli generate -i openapi.yaml -g python -o ./generated-python-client
Run the command 'poetry install'
You will get this error
Suggest a fix
The generation of the setup.py is incorrect, as it should call the setup method for me :
This file does not seem to be used properly ->
openapi-generator/modules/openapi-generator/src/main/resources/python/setup.mustache
Line 9 in a95ea1f
The text was updated successfully, but these errors were encountered: