Skip to content

3.0.0 Beta 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@commonsensesoftware commonsensesoftware released this 27 Jul 15:23

This the next major iteration of API versioning for all platforms. NuGet package distribution will begin with a Beta release will provide an opportunity to play with new features, provide feedback, and let things burn in before releasing for general availability.

The most significant new feature is support for the highly anticipated and demanded ASP.NET Core with OData implementation. It will take some time to update all of the documentation on the wiki, but in the meantime there are example projects that illustrate how to configure your application.

Features

The following are new features or enhancements since 2.3.0:

All Platforms

  • Added support for multiple query string parameters (Issue #277)
  • Added support to configure/use alternate route constraint name (Issue #279)
  • Added support for custom API version conventions via IApiVersionConvention<T> (Issue #278)
  • Added support IControllerConvention (Issue #278)
  • Added support for IControllerConventionBuilder (Issue #278)
  • Added the new VersionByNamespaceConvention (Issue #278)
  • Added model binding support for ApiVersion (Issue #320)

ASP.NET Web API with OData

  • Updated to the OData 7.0 library (no plans to continue supporting 6.x)
  • Added support to update or change OData conventions during route mapping (Issue #308)

ASP.NET Core

  • Added and refactored to use the new IApiVersioningFeature (Issue #280)
  • Improved the catch-all route behavior (Issue #281)
  • AddVersionedApiExplorer now calls the built-in AddApiExplorer implicitly
  • Added support for UseApiVersioning (advanced scenario to control middleware registration)
  • Added the ApiVersioningOptions.RegisterMiddleware option, which defaults to true
    • Setting this to false can be paired with UseApiVersioning for advance middleware scenarios
  • All dependency injection registrations are now lazily evaluated

ASP.NET Core with OData

  • Added API versioning support
  • Added API Explorer support

Breaking Changes

The following are breaking changes since 2.3.0:

All Platforms

  • ApiVersionConventionBuilder.ControllerConventions is now ApiVersionConventionBuilder.ControllerConventionBuilders
    • ApiVersionConventionBuilder.ControllerConventions now refers to a collection of the new IControllerConvention interface

ASP.NET Web API

  • ApiVersionRequestProperties.RawApiVersion was renamed to ApiVersionRequestProperties.RawRequestedApiVersion (for parity with ASP.NET Core feature)
  • ApiVersionRequestProperties.ApiVersion was renamed to ApiVersionRequestProperties.RequestedApiVersion (for parity with ASP.NET Core feature)

ASP.NET Web API with OData

  • Instances of the System.Web.OData namespace were updated to Microsoft.AspNet.OData (also has parity with OData 7.0 and ASP.NET Core)
  • VersionedODataModelBuilder.ModelBuilderFactory now uses new ODataConventionModelBuilder().EnableLowerCamelCase() by default

ASP.NET Core

  • AddVersionedApiExplorer is now a IServiceCollection extension method instead of a IMvcCoreBuilder extension method
  • AddApiVersioning no longer implicitly calls AddMvcCore (it doesn't have an actual dependency on it)
  • IApiVersionRoutePolicy no longer implements IRouter; the old RouteAsync method is now Evaluate(RouteContext, ActionSelectionResult)
  • ApiVersionConvention has been removed and replaced by ApiVersionCollator (Issue #301)