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
Is there actually an issue or you just made an observation?
It's possible something was missed, but this particular part of route building is not attempting to build the full path. This is looking for the root part of the OData path, which can only be:
An entity set (e.g. collection)
A singleton
An unbounded action or function
The place where this looks like it might be an issue is inside IsNavigationPropertyLink. It covers {HttpMethod}{PropertyName}, but not {HttpMethod}To{PropertyName}.
While that is worth fixing, the only scenario I see that would be an issue is that a navigation property could be misinterpreted as an action or function.
The documentation for OData conventions is useful, but I don't trust it due to painful history lessons. I reference the conventions/templates found directly in the code as the source of truth.
Is there actually an issue or you just made an observation?
The place where this looks like it might be an issue is inside IsNavigationPropertyLink. It covers {HttpMethod}{PropertyName}, but not {HttpMethod}To{PropertyName}
The documentation for OData conventions is useful, but I don't trust it due to painful history lessons. I reference the conventions/templates found directly in the code as the source of truth.
Activity
commonsensesoftware commentedon Apr 30, 2021
Is there actually an issue or you just made an observation?
It's possible something was missed, but this particular part of route building is not attempting to build the full path. This is looking for the root part of the OData path, which can only be:
The place where this looks like it might be an issue is inside
IsNavigationPropertyLink. It covers{HttpMethod}{PropertyName}, but not{HttpMethod}To{PropertyName}.While that is worth fixing, the only scenario I see that would be an issue is that a navigation property could be misinterpreted as an action or function.
strandman commentedon May 5, 2021
Yes it is an issue because ODataActionDescriptorProvider.cs#L55 removes the ActionDescriptor and It'll not be readded because
IsRouteExcluded = ActionType == ODataRouteActionType.Unknownand will never hit ODataRouteBindingInfoConvention.cs#L156.PutToandPatchToworks simply because ODataRouteBuilderContext.cs#L127 ignores those verbs.Yes I understand, the navigation template you should look at is: NavigationRoutingConvention.cs#L85
Sorry for bad grammar, I'm not an English speaking person ;)
commonsensesoftware commentedon May 5, 2021
Thanks for the confirmation. It looks like this use case is indeed missed so I'm going to go ahead and mark it as a bug.
Handle 'PostTo' navigation properties. Fixes #742
Handle 'PostTo' navigation properties. Fixes #742
Handle 'PostTo' navigation properties. Fixes #742