You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So .NET 5 has been out since November, as far as I can tell it will not work properly with OData, Swagger, and Api-Versioning.
Background:
I have a netcoreapp3.1 project that has been running with the following libraries
Microsoft.AspNetCore.OData.Versioning 4.1.1
Microsoft.AspNetCore.OData.Versioning.ApiExplorer 4.1.1
I have 3 groups of controllers
v1 - that is using ControllerBase
v1.1 - that is using a mix of ODataController and ControllerBase
v1.2 - that is using ODataController
this has all worked correctly for the most part and we have tests around everything, exercising the different scenarios.
We are only using attribute routing ie: api-version=1.1 etc...
We are updating our services to .NET 5 and I have done the following:
Update Microsoft.AspNetCore.OData.Versioning to 5.0.0
Update Microsoft.AspNetCore.OData.Versioning.ApiExplorer to 5.0.0
Update other Microsoft libraries to 5.0.0 (if applicable)
What i'm seeing is that all of my OData test routes are no longer working using the route attributes (api-version=1.1)
etc..
Is this expected to work or am I too early on getting this integrated in to .NET 5
The text was updated successfully, but these errors were encountered:
Please notice that the version 5.0 of Microsoft.AspNetCore.OData.Versioning.ApiExplorer and Microsoft.AspNetCore.OData.Versioning is not related to .NET 5(they depend on Microsoft.AspNetCore.Mvc.Versioning 4.2.0 which doesn't have a version '5.0').
In fact the author of ApiVersioning has no plan to support .NET 5(see #695 (comment)). But you can still use ApiVersioning and .NET 5 together because .NET 5 is downward compatible with .NET Core.
This issue is a problem with Microsoft.AspNetCore.OData.Versioning.ApiExplorer 5.0.0 itself, not only in .NET 5 but also happens in .NET Core 3.x. See #710 (comment) and the related issues mentioned in this comment. Either downgrade to Microsoft.AspNetCore.OData.Versioning.ApiExplorer v4.x or do not use odata attribute routing.
ps: do not use Microsoft.AspNetCore.OData v8(now is a preview version), it is designed for .NET 5, but is not compatible with ApiVersioning.
So .NET 5 has been out since November, as far as I can tell it will not work properly with OData, Swagger, and Api-Versioning.
Background:
I have a netcoreapp3.1 project that has been running with the following libraries
Microsoft.AspNetCore.OData.Versioning 4.1.1
Microsoft.AspNetCore.OData.Versioning.ApiExplorer 4.1.1
I have 3 groups of controllers
v1 - that is using ControllerBase
v1.1 - that is using a mix of ODataController and ControllerBase
v1.2 - that is using ODataController
this has all worked correctly for the most part and we have tests around everything, exercising the different scenarios.
We are only using attribute routing ie: api-version=1.1 etc...
We are updating our services to .NET 5 and I have done the following:
What i'm seeing is that all of my OData test routes are no longer working using the route attributes (api-version=1.1)
etc..
Is this expected to work or am I too early on getting this integrated in to .NET 5
The text was updated successfully, but these errors were encountered: