Add versioning to .NET 10 minimal API using Asp.Versioning.Http
Authorised Territory demonstrates how to add API versioning to a .NET 10 Minimal API using the Asp.Versioning.Http NuGet package.
Overview
The video shows how a Minimal API can expose two versions of the same endpoint using the Asp.Versioning libraries.
Add API versioning with Asp.Versioning.Http
- Uses the Asp.Versioning.Http NuGet package to enable versioning for ASP.NET Core Minimal APIs.
- Configures the API so that a single logical endpoint can be served under multiple versions.
Versioning strategies demonstrated
- Query parameter versioning
- Clients pass the version number via a query string parameter.
- URL segment versioning
- Clients pass the version number as part of the route (URL path segment).
Deprecate an API version
- Demonstrates how to mark a specific API version as deprecated, so consumers can be guided toward newer versions.
Testing in Visual Studio
- Uses a .http file in Visual Studio 2026 to send requests and validate behavior across versions.