Skip to content

WithOpenApi() ignore Api versioning readers #1044

Open
@Grzesiek23

Description

@Grzesiek23

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm encountering an issue with Swagger/OpenAPI documentation in my ASP.NET Core project, where I'm utilizing API versioning. When using WithOpenApi() method on my endpoints, Swagger documentation fails to generate correctly.

The problem occurs with Header or MediaType way of versioning.

screen

Without WithOpenApi(), documentation for different API versions generates properly.

Expected Behavior

WithOpenApi() should allow for the correct generation of Swagger/OpenAPI documentation across different API versions.

Steps To Reproduce

Go and clone repo:
https://github.com/Grzesiek23/MinimalApiWithOpenApiProblem

Exceptions (if any)

No response

.NET Version

7 nad 8

Anything else?

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions