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)
AddVersionedApiExplorer
now calls the built-inAddApiExplorer
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 withUseApiVersioning
for 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.ControllerConventions
is nowApiVersionConventionBuilder.ControllerConventionBuilders
ApiVersionConventionBuilder.ControllerConventions
now refers to a collection of the newIControllerConvention
interface
ASP.NET Web API
ApiVersionRequestProperties.RawApiVersion
was renamed toApiVersionRequestProperties.RawRequestedApiVersion
(for parity with ASP.NET Core feature)ApiVersionRequestProperties.ApiVersion
was renamed toApiVersionRequestProperties.RequestedApiVersion
(for parity with ASP.NET Core feature)
ASP.NET Web API with OData
- Instances of the
System.Web.OData
namespace were updated toMicrosoft.AspNet.OData
(also has parity with OData 7.0 and ASP.NET Core) VersionedODataModelBuilder.ModelBuilderFactory
now usesnew ODataConventionModelBuilder().EnableLowerCamelCase()
by default
ASP.NET Core
AddVersionedApiExplorer
is now aIServiceCollection
extension method instead of aIMvcCoreBuilder
extension methodAddApiVersioning
no longer implicitly callsAddMvcCore
(it doesn't have an actual dependency on it)IApiVersionRoutePolicy
no longer implementsIRouter
; the oldRouteAsync
method is nowEvaluate(RouteContext, ActionSelectionResult)
ApiVersionConvention
has been removed and replaced byApiVersionCollator
(Issue #301)