Skip to content

1.1 Release Candidate

Pre-release
Pre-release
Compare
Choose a tag to compare
@commonsensesoftware commonsensesoftware released this 12 May 19:17

At long last, this is the release candidate for 1.1. I hadn't planned any new features, but based on feedback and bugs, a couple of features made it in. This release is expected to have 100% parity with the official 1.1 release. The purpose of the release candidate is only meant to publish a build that the community can use to verify all of the related bug fixes have indeed been resolved and there are no additional regressions.


Important Release Notes for ASP.NET Core

Breaking changes between official releases are carefully considered, but sometimes necessary. After careful
consideration and consultation with the ASP.NET team, a behavioral breaking change is required in API
versioning for ASP.NET Core. This is the result of multiple factors in the current routing infrastructure and
API versioning implementation. The consequences cause the API versioning extensions to incorrectly return HTTP
status code 400 or 404 in some cases. Great care was given to limit the external side effects, but all
applications will now be required to add the following to their application configurations:

public void Configure( IApplicationBuilder app, IHostingEnvironment env )
{
    app.UseMvc();
    app.UseApiVersioning();
}

This is required to make sure that intrinsic features like route constraints continue work once API versioning is
enabled. To ensure that attribute-based and convention-based routing work as expected, the call to
UseApiVersioning() should always occur after UseMvc().

Sometime in the ASP.NET Core 2.0+ timeline, I'll be working with the ASP.NET team to improve this experience and
hopefully remove this requirement in the API versioning 2.0 support.


Features

  • Added ApiVersionFormatProvider (see version format)
  • ApiVersion implementation of IFormattable now uses ApiVersionFormatProvider (see version format)
  • API explorers now support options

Fixes

ASP.NET Web API

  • ApiExplorer doesn't select the correct action when using MapToApiVersion (#117)
  • Controllers marked as API version-neutral do not appear in Swagger (#118)
  • Adding ITraceWriter breaks API versioning; also affects OData (#119)

ASP.NET Core

  • HttpPut and HttpDelete template parameter names issue (#106)
  • Optional parameters don't work (#122)

Breaking Changes

Since Beta 2

ASP.NET Web API

  • VersionedApiExplorer.GetGroupName() is now protected; use the alternative forms instead:
    • ApiDescriptionGroupCollection.Name
    • VersionedApiDescription.GroupName
    • ApiDescription.GetGroupName() [extension method]
  • Custom formatting is no longer applied to ApiVersion for the default group names

ASP.NET Core

  • Removed IApiVersionGroupNameFormatter; supplanted by ApiExplorerOptions.GroupNameFormat (see version format)
  • Custom formatting is no longer applied to ApiVersion for the default group names

Since 1.0

  • ApiVersion format strings in ToString() are superceded by ApiVersionFormatProvider
  • ASP.NET Core applications must now call UseApiVersioning() extension method in Configure