3.0.0 Beta 2
Pre-releaseThe Beta 2 release marks a key milestone, which includes an array of fixes as well as new features you've been asking for. This release is expected to mark 3.0 as feature complete. Any further changes from now to the official release are only expected to include additional bug fixes or performance enhancements.
Features
The following are new features or enhancements since 3.0.0 Beta 1:
All Platforms
- API Explorer now allows including API version parameters for version-neutral APIs; still defaults to none
- Support API version interleaving across types (#230)
- Support versioning by action (#230)
ASP.NET Web API
- API version models are now pre-aggregated; improving runtime performance
ASP.NET Core
- Honor API Behaviors when applied
Fixes
The following are fixes and patches since 3.0.0 Beta 1:
All Platforms
- Fix version parsing in VersionByNamespaceConvention (#366)
- Sanitize URLs in error responses
- Clip dependent package references to their next respective major version (#376)
ASP.NET Web API
IsApiVersionNeutral()
convention does not make an API version-neutral (#322)
ASP.NET Web API with OData
- Fix MissingManifestResourceException (#331)
- Fix basic model substitution (#335)
- Support complex model substitution (#358, #382)
- Fix route prefix handling and URL segment substitution (#365)
ASP.NET Core with OData
- Fix incorrect OData action selection (#336, #337, #341)
- Fix basic model substitution (#335)
- Support complex model substitution (#358, #382)
- Fix route prefix handling and URL segment substitution (#365)
Breaking Changes
Breaking changes are always carefully considered. In designing some of the new features, it became clear that a few breaking changes were required. Given 3.0 is a major release, now was the appropriate time to introduce these changes. For most users, the changes will be transparent. The differences are most visible to those that are using the customization and extension features.
The following are breaking changes since 2.3.0 and 3.0.0 Beta 1:
All Platforms
The IApiVersionProvider now has the signature:
public interface IApiVersionProvider
{
ApiVersionProviderOptions Options { get; }
IReadOnlyList<ApiVersion> Versions { get; }
}
Where the options are:
[Flags]
public enum ApiVersionProviderOptions
{
None,
Deprecated = 1,
Advertised = 2,
Mapped = 4,
}
The new Mapped option disambiguates a declared API version from an API version mapped to a declaration.
The new MappingTo(ApiVersion)
extension method determines whether an API is mapped and if it is explicit or implicit. The IsMappedTo(ApiVersion)
extension method is now available on all platforms.
The ApiVersionModel constructors have been reduced to forms that have no dependencies or assumptions on collecting information from attributes.
ASP.NET Web API
- All other forms of retrieving or enumerating API versions has been reduced to only
GetApiVersionModel
extension method
Community Contributions
Special thanks to the support and contributions from the community: