Skip to content
Documentation

HAKOM.Versioning.Http.Net Assembly

Provides HTTP-layer versioning support for HAKOM web services.

This assembly extends the core versioning module (IVersion) with ASP.NET Core integration, enabling media-type-based API versioning and version information endpoints for HTTP APIs.

The key capabilities are:

  1. Media-type version negotiation — The api-version parameter in the Accept header is used to select the correct controller based on its namespace (e.g. v4_3_1). Enable this by calling SelectEndpointsByNamespaceAndMediaTypeVersion(this IMvcBuilder, HttpStatusCode).
  2. Version information endpoint — A root GET endpoint that returns the service version and all supported API versions. Register it with AddVersionedServiceInformationEndpoints(this IMvcBuilder, string).
  3. OpenAPI integration — Document and schema filters that add api-version parameters to Swagger/OpenAPI media types.

Typical setup in a HAKOM HTTP service:

// In the DI container setup:
container
.UseVersionedServiceInformation()
.UseVersionStringSerializers()
.UseVersionedServiceInformationSerializers();
// In the MVC builder setup:
mvcBuilder
.AddVersionedServiceInformationEndpoints()
.SelectEndpointsByNamespaceAndMediaTypeVersion();
Namespaces
HAKOM.Versioning.Http.Net.Api Contains the public API surface of the HTTP versioning module.
HAKOM.Versioning.Http.Net.Api.Exceptions Contains exception types thrown when HTTP version negotiation fails.
HAKOM.Versioning.Http.Net.Api.Extensions Contains extension methods for registering HTTP versioning services with the dependency injection container and the MVC builder.
© 2026 Volue.Version v0.6.38017 November 2026