WebApi
WebApi copied to clipboard
OData link generation broken for singletonSegment/navPropSegment/KeySegment paths
When generating a link to an OData resource, the link is generated incorrectly if the model is in the structure of a singleton containing a contained navigation property to an entity set.
Assemblies affected
OData.WebAPI 7.4.0 OData.WebAPI 7.5.15
Reproduce steps
See the test case here: https://github.com/stephenjust/WebApi/commit/e65b6c4efe62feafee919a11d20b1d75462946ec
Expected result
Test case output should be "http://localhost/MyNextOrder/OrderLines(21)/OrderLines"
Actual result
Test case output is "http://localhost/(21)/OrderLines"
This issue is still present in 7.5.15
Hi @xuzhg -- could you take a look into this issue?