Skip to content

1.1.0 Beta 1

Pre-release
Pre-release
Compare
Choose a tag to compare

It's hard to believe that it's been six months since the official 1.0 release, but here we are. I'd like to thank the community for all your contributions, comments, questions, and feedback to help make this project a success. This release will mark the first significant set of roll-up changes since 1.0. This release is primarily made up of fixes, but there are a couple of new features as well; specifically, there is now out-of-the-box support for API versioning using media type negotiation as many have asked for. Keep an eye out for the updated documentation on the wiki soon. If you are an author of extensions and/or other low-level customizations, pay special attention the breaking changes that are being introduced.

Fixes

There have been a bunch of small, incremental fixes up to this point which did not mark an overall release. The following summarizes all of the fixes since 1.0, including the most recent fixes that have not previously been published in any package.

All Platforms

  • Fixed reporting of API versions when conventions are used (#47)
  • Fixed matching API-versioned controller action by convention (#54)
  • Fixed 404 repsonse instead of 400 when API version is unspecified (#61 and #62)
  • Refactored error respones to return 405 over 400 when appropriate (#65)
  • Added missing support IApiVersionReader for URL segment versioning (#91)
  • Fixed inherited version neutrality (#93)

ASP.NET Web API

  • Fixed InvalidCastException when attribute-routed controllers have the same name (#44)

ASP.NET Web API with OData

  • Fixed OData entity key value segment with custom route parameter name (#40)

ASP.NET Core

  • Fixed NullReferenceException when a controller action is not matched (#52)
  • Fixed use of all candidates instead of just filtered matches (#83)
  • Changed the scope of ApiVersionModel constructors to make it extensible (#87)
  • Reduced dependencies to Microsoft.AspNetCore.Mvc.Core (>= 1.1.1) (#66, #78, and MSA-4010983)

Features

  • Added UrlSegmentApiVersionReader (related to #91)
  • Added MediaTypeApiVersionReader (related to #42 and #70)
  • Added IErrorResponseProvider and ErrorResponseContext (supplants CreateBadRequestDelegate)
  • Added ApiVersioningProperties with extension method to get API version information from the current request

Breaking Changes

While I strive to never have breaking changes, at times they are inevitable. Careful consideration is made to limit when break changes are introduced to reduce the amount of impact. The following lists the set of surface area changes that may result in a breaking change. The vast majority of the changes are related to extensions and customizations. If those scenarios do not apply to you, then you'll very likely be unaffected.

All Platforms

  • ApiVersionConventionBuilder.ApplyTo now returns bool instead of void
  • ApiVersionReader:
    • is now a static class instead of an abstract class
    • no longer contains the FromQueryString or FromHeader methods
    • adds a public static Combine method to promote IApiVersionReader composition rather than inheritance
  • Removed QueryStringOrHeaderApiVersionReader; it's replaced by ApiVersionReader.Combine( new QueryStringApiVersionReader(), new HeaderApiVersionReader( "api-version" ) )
  • Removed GetRawRequestedApiVersion extension method and replaced it with ApiVersioningProperties().RawApiVersion
  • Removed SetRequestedApiVersion extension method and replaced it with ApiVersioningProperties().ApiVersion
  • Removed CreateBadRequestDelegate and replaced it with IErrorResponseProvider.BadRequest
  • Removed ApiVersioningOptions.CreateBadRequest and replaced it with ApiVersioningOptions.ErrorResponses.BadRequest

ASP.NET Core

  • Removed HasExplicitVersioning extension method because it's no longer used
  • Removed ImplicitControllerVersionConvention because its implementation was merged into ApiVersionConvention
  • Moved IControllerModelConvention implementation from ApiVersionAttribute to ApiVersionConvention (related to #87)