WebApi icon indicating copy to clipboard operation
WebApi copied to clipboard

OData link generation broken for singletonSegment/navPropSegment/KeySegment paths

Open stephenjust opened this issue 5 years ago • 2 comments

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"

stephenjust avatar May 08 '20 21:05 stephenjust

This issue is still present in 7.5.15

stephenjust avatar Jun 22 '22 23:06 stephenjust

Hi @xuzhg -- could you take a look into this issue?

mikepizzo avatar Jun 23 '22 06:06 mikepizzo