I created a working sample project https://github.com/surenrao/Dotnet5WebApiODataVersioning with all my required usecase. which are
- Swagger support
- Web ApiVersioning using namespace convention
- ODATA without EDM support
My goal is to upgrade to dotnet 6 and use ASP.NET Core OData 8.x. When i tried to upgrade, it had breaking changes to OData versioning and EDM is now required? I believe its due to https://github.com/dotnet/aspnet-api-versioning not supporting OData 8.x yet.
Has anybody encountered similar issue. Any help or direction is appreciated
Correct, as of today 2/21/2022, it is not officially supported. You are unlikely to be able to get it to work under any circumstances. OData 8.0 has underlying breaking changes that requires many infrastructure pieces to be rewritten.
This gap has existed for a while, but I'm finally getting close to addressing it. Keep an eye out on the repo for some announcements and roadmap in the coming weeks. Unfortunately, I don't have a more specific answer at the moment. I will follow up on this question when there is.
Edit: Update
ASP.NET API Versioning finally has official support for OData 8.0 on .NET 6.0, including the API Explorer extensions.
Examples:
New Packages: