Skip to content

OData 5.0.0 RC 1

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

This marks the initial release of 5.0. The versioning scheme across library versions has drifted over time. The major version bump is required for OData support, but all other libraries and their versions are expected to realign in the .NET 5.0 time frame.

While there is a myriad of fixes and feature changes, this release is heavily focused on OData support. The long-requested Endpoint Routing support is now available. That work led to a complete overhaul of the versioning infrastructure used for OData, resulting in a simpler
implementation and removes several internal workarounds.

Due to the amount of changes, this release will start with a pre-release to afford some burn-in time. Once there has been a chance to exercise things with real workloads, it will be promoted to an official release. Expect this release to have the same level of quality as official releases.

Features

The following are new features and/or enhancements since 4.1:

All Platforms

  • Support API Version in URL Generation (#663)

ASP.NET Web API

  • HttpControllerDescriptorExtensions.AsEnumerable is now public

ASP.NET Web API with OData

  • Add IEdmModelSelector interface
  • Overhaul route registration
  • Add RoutePrefix extension method for ApiDescription

ASP.NET Core

  • Default error response provider should return errors in ProblemDetails format (#612)

ASP.NET Core with OData

  • Add IEdmModelSelector interface
  • Overhaul route registration
  • Add RoutePrefix extension method for ApiDescription
  • Support Endpoint Routing (#608, #616, #647)
  • Update all examples to use Endpoint Routing
  • Add new examples on par with ASP.NET Web API examples

Fixes

The following are fixes and patches since 4.1.0:

All Platforms

  • Unable to add versioning NuGet package (#587, #637)

ASP.NET Web API

  • CORS preflight request with URL Path versioning results in ArgumentNullException (#619)

ASP.NET Web API with OData

  • CreateRef and DeleteRef Issue (#573)
  • Support OData $select for PUT/PATCH/POST (#594)
  • Issue with OData Singleton entity controller actions (#610)
  • Multiple Route Prefixes for a single API Version (#628)
  • NullReferenceException exploring API by URL segment

ASP.NET Core

  • ApiVersionMatcherPolicy doesn't check candidate validity (#600, #658)

ASP.NET Core with OData

  • Net core odata with versioning and template in url prefix (#529)
  • Startup.cs in another assembly causes OData to return 404 (#551)
  • Error: "Cannot find the services container for route" when using MapVersionedODataRoute (#553)
  • Action parameter gets defined twice when using multiple odata routes (#555)
  • CreateRef and DeleteRef Issue (#573)
  • Support OData $select for PUT/PATCH/POST (#594)
  • ODataQueryOptions parameter on method generates over 1600 parameters in Swagger UI (#599)
  • Issue with OData Singleton entity controller actions (#610)
  • Multiple Route Prefixes for a single API Version (#628)
  • Using MapDynamicControllerRoute("{**path}") throws NullReferenceException (#658)
  • NullReferenceException exploring API by URL segment

Breaking Changes

The following outlines the breaking changes.

ASP.NET Core

  • IRouter legacy routing returns 405 versus 400 for unmatched candidate, filtered by route constraint

    • This was previously undetected in the test suite
    • The last implementation produced the correct response for this scenario, but with the wrong response for others
    • Only the status code is different; the payload is the same
    • Endpoint Routing is not affected

    Workaround: This scenario is only expected to occur when routes differ by route constraint alone. For example, api/values/{id}?api-version=1.0 versus api/values/{id:int}?api-version=2.0. To retain
    the previous and expected functionality, remove the :int route constraint and perform the validation in the controller action instead.

ASP.NET Web API with OData

  • VersionedAttributeRoutingConvention.ApiVersion has been removed
  • Removed MapVersionedODataRoutes; only MapVersionedODataRoute is now required
  • Removed ODataApiVersionRequestProperties
  • Removed VersionedODataPathRouteConstraint
  • IModelConfiguration.Apply has new routePrefix parameter

ASP.NET Core with OData

  • VersionedAttributeRoutingConvention.ApiVersion has been removed
  • Removed MapVersionedODataRoutes; only MapVersionedODataRoute is now required
  • Removed IODataVersioningFeature
  • Removed VersionedODataPathRouteConstraint
  • IModelConfiguration.Apply has new routePrefix parameter