3.0.0 Beta 1
Pre-release
Pre-release
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)
AddVersionedApiExplorernow calls the built-inAddApiExplorerimplicitly- Added support for
UseApiVersioning(advanced scenario to control middleware registration) - Added the
ApiVersioningOptions.RegisterMiddlewareoption, which defaults to true- Setting this to
falsecan be paired withUseApiVersioningfor advance middleware scenarios
- Setting this to
- 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.ControllerConventionsis nowApiVersionConventionBuilder.ControllerConventionBuildersApiVersionConventionBuilder.ControllerConventionsnow refers to a collection of the newIControllerConventioninterface
ASP.NET Web API
ApiVersionRequestProperties.RawApiVersionwas renamed toApiVersionRequestProperties.RawRequestedApiVersion(for parity with ASP.NET Core feature)ApiVersionRequestProperties.ApiVersionwas renamed toApiVersionRequestProperties.RequestedApiVersion(for parity with ASP.NET Core feature)
ASP.NET Web API with OData
- Instances of the
System.Web.ODatanamespace were updated toMicrosoft.AspNet.OData(also has parity with OData 7.0 and ASP.NET Core) VersionedODataModelBuilder.ModelBuilderFactorynow usesnew ODataConventionModelBuilder().EnableLowerCamelCase()by default
ASP.NET Core
AddVersionedApiExploreris now aIServiceCollectionextension method instead of aIMvcCoreBuilderextension methodAddApiVersioningno longer implicitly callsAddMvcCore(it doesn't have an actual dependency on it)IApiVersionRoutePolicyno longer implementsIRouter; the oldRouteAsyncmethod is nowEvaluate(RouteContext, ActionSelectionResult)ApiVersionConventionhas been removed and replaced byApiVersionCollator(Issue #301)