-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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-nextgen
circular refs lead to no imports
#16010
Comments
can you please try the latest master (snapshot version can be found in the readme)? I remember merging a fix for that. |
in the latest master, python-nextgen has been renamed to python |
I just tested with openapi-generator-cli-7.0.0-20230705.091805-173.jar using The imports are still absent. |
FYI this was working in the That generator has moved to a different repo where it has test of self referencing object and array models. You can see them here: |
I tested it with the latest master and
what error did you get when using the auto-generated client/sdk? |
Signed-off-by: ふぁ <[email protected]>
Here is how to reproduce this
from petstore_api.models.first_ref import FirstRef
FirstRef.from_dict({}) This is the output
|
@fa0311 thanks for the details. Will look into it with your PR this weekend. |
* [python-nextgen] fix #16010 circular refs lead to no imports Signed-off-by: ふぁ <[email protected]> * [python-nextgen] update samples Signed-off-by: ふぁ <[email protected]> * [python-nextgen] remove unnecessary Postponed annotations Signed-off-by: ふぁ <[email protected]> * [python-nextgen] update samples Signed-off-by: ふぁ <[email protected]> * [python-nextgen] remove unnecessary Postponed annotations Signed-off-by: ふぁ <[email protected]> * [python-nextgen] update samples Signed-off-by: ふぁ <[email protected]> * [python-nextgen] update samples Signed-off-by: ふぁ <[email protected]> --------- Signed-off-by: ふぁ <[email protected]>
Bug Report Checklist
Description
Generation is successful, but for recursive models the imports are missing, when trying to generate from https://github.com/hashintel/hash/blob/main/apps/hash-graph/openapi/openapi.json you can see how in
models/filter.py
the import forAnyFilter
is missing and how inmodels/any_filter.py
the import is missing forFilter.
openapi-generator version
6.6.0
OpenAPI declaration file content or URL
https://github.com/hashintel/hash/blob/main/apps/hash-graph/openapi/openapi.json
Generation Details
Steps to reproduce
Simply generate with the aforementioned schema
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: