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
We are running into an issue with the path templates not being generated correctly when using an ODataRoutePrefix. Our OData endpoint is set up in the following way.
It looks like the ODataActionDescriptor is created by the AttributeRouteStrategy. To generate the path template it looks like it is using the ODataRoute prefix (in this scenario "api/v1/admin") and ODataRouteAttribute.PathTemplate (in this scenario "({key})/attributevalues({attributevalueKey})") to generate the path template. The resulting path template ends up looking like the following.
We are running into an issue with the path templates not being generated correctly when using an ODataRoutePrefix. Our OData endpoint is set up in the following way.
Config
Controller
It looks like the ODataActionDescriptor is created by the AttributeRouteStrategy. To generate the path template it looks like it is using the ODataRoute prefix (in this scenario "api/v1/admin") and ODataRouteAttribute.PathTemplate (in this scenario "({key})/attributevalues({attributevalueKey})") to generate the path template. The resulting path template ends up looking like the following.
api/v1/admin/({key})/attributevalues({attributevalueKey})
I would expect it to be
api/v1/admin/products({key})/attributevalues({attributevalueKey})
I think the same logic that is being used by AttributeRoutingConvention.GetODataPathTemplate would be needed to generate the correct path.
The text was updated successfully, but these errors were encountered: