Skip to content

Use Asp.Versioning.OpenApi with minimal Apis without MVC #1195

Description

@basvanharten

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

When for a Minimal API ASP.NET Core project using the Asp.Versioning.OpenApi package the ASP.NET Core MVC functionality is also added, buth as a build dependency and runtime as service in the service collection for dependency injection.

Since the API itself doesn't require the MVC functionality (like using ApiControllers) this seems an unnecessary dependency which adds to the startup time of the API.

Describe the solution you'd like

The best solution, altough not that simple would be to split up the Asp.Versioning.OpenApi package into two separate packages one for MVC (i.e. Asp.Versioning.Mvc.OpenApi) and one for minimal apis (Asp.Versioning.Http.OpenApi)

Additional context

No response

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions