'Is it possible to use AspNet Api Versioning with Net 6 Minimal APIs?

I am using Net 6 Minimal APIs:

application.MapGet("countries", async (IService service) => {
  var countries = await mediator.Send(request);
  return Results.Ok(countries);
});

Is it possible to use AspNet Api Versioning with Net 6 Minimal APIs? How?



Solution 1:[1]

ASP.NET API Versioning with Minimal APIs is not currently supported. It is on the roadmap as a feature enhancement.

ASP.NET API Versioning now supports Minimal APIs.

New Packages:

Examples:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1