Skip to content

[BUG] python-nextgen circular refs lead to no imports #16010

@indietyp

Description

@indietyp

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
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 for AnyFilter is missing and how in models/any_filter.py the import is missing for Filter.

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
    "generatorName": "python-nextgen",
    "packageName": "hash_openapi",
Steps to reproduce

Simply generate with the aforementioned schema

Related issues/PRs
Suggest a fix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions