Skip to content

Pydantic schemav2 creates unexpected MyOtherModel = MyModel - still #2639

@gothicVI

Description

@gothicVI

This is a reopening of #2487

Why is this still an issue when using --output-model-type pydantic_v2.BaseModel? How can I get v2 models without the colapse?

Version:

  • OS: debian 12
  • Python version: 3.13
  • datamodel-code-generator version: 0.42.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions