Skip to content

The .NET OpenAPI generator is creating duplicate models when generating from a minimal API setup in .NET 9. #1934

@jzs11

Description

@jzs11

Describe the bug
The .NET OpenAPI generator is creating duplicate models when generating from a minimal API setup in .NET 9.

OpenApi File To Reproduce
Steps to reproduce:

  • Create a .NET 9 minimal API project
  • Generate OpenAPI specification using the built-in tools
  • Observe the generated output contains duplicate entries

Expected behavior
The OpenAPI generator should create unique model without any duplication, properly reflecting the minimal API structure.

Screenshots/Code Snippets
Sample1
Image

Sample2
Image

And few others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions