Skip to content

API Version Support is Incompatible with OData for Web API Library 6.0 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
commonsensesoftware opened this issue Oct 18, 2016 · 4 comments
Assignees
Milestone

Comments

@commonsensesoftware
Copy link
Collaborator

Changes in the OData library 6.0 for Web API introduces changes that are incompatible with the OData API versioning support. OData API versioning should also support 6.0. Various incompatibility issues arise as reported by issue #35.

@joaopbnogueira
Copy link

Hi,

Is this issue being addressed by anyone?

I'm working on a fix, but it won't be backwards-compatible with the current version.

The solution requires a change of interface in the MapVersionedODataRoutes methods to something like:

public static IReadOnlyList<ODataRoute> MapVersionedODataRoutes(this HttpConfiguration configuration, string routeName, string routePrefix, Action<IContainerBuilder> configureAction, IEnumerable<IEdmModel> models)

Thanks

@commonsensesoftware
Copy link
Collaborator Author

Unfortunately, it's just been me and I've been tied up with other priorities; primarily my day job. I'm a strong advocate and consumer of OData, so being able to move past 5.9.1 to 6.0+ is something I definitely want to see happen.

From my cursory examination, I know that support for 6.0+ won't be backward compatible. There are significant breaking changes in the OData library. It's unfortunate that the changes are breaking, but the from what I've seen, I'm pleased with the changes they've made; I think it's in the right direction.

I believe you're right, most of the changes are in the related MapVersionedODataRoutes. Since DI has now been introduced with first-class support, I'm not even sure these methods are required anymore. They were needed to change the behaviors of how routing was setup, including behaviors like conventions, casing, etc. I believe that most or all of these aspects can now be changed via the DI support.

I'll see if I can dedicate some time this week. If you have anything to show or share, I'm more than happy to take a look.

@joaopbnogueira
Copy link

joaopbnogueira commented Jan 5, 2017 via email

@joaopbnogueira
Copy link

joaopbnogueira commented Jan 6, 2017

Have a look at my latest commit here

  • With the exception of VersionedMetadataRoutingConventionTest.cs all tests pass on Microsoft.AspNet.OData.Versioning.Tests
  • I'm not sure how to reference types "MetadataPathSegment/EntitySetPathSegment", or if the tests still make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants