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
Invalid OData control annotations such as @odata.context, @odata.id, @odata.editLink, etc. are rendered for an expanded non-contained 1->1 navigation property that is bound to a contained entity set.
The OData serializer should use navigation property bindings of the root entity set when generating OData control annotation links. The expected output would be:
Invalid OData control annotations such as @odata.context, @odata.id, @odata.editLink, etc. are rendered for an expanded non-contained 1->1 navigation property that is bound to a contained entity set.
Assemblies affected
OData .Net lib 7.9.4
Reproduce steps
Sample metadata:
The following OData request https://localhost:44113/api/v1/Sites(1)/Plants(1)/Pipelines(1)?$expand=Plant&$format=application/json;odata.metadata=full will produce the invalid response. Note that even though there is no @odata.context annotation for the expanded Plant property in the sample below, we have instances when it gets generated incorrectly and breaks OData clients. The sample project that demoes this problem is attached.
Expected result
The OData serializer should use navigation property bindings of the root entity set when generating OData control annotation links. The expected output would be:
Actual result
Note that there is no Plants navigation property defined on the pipeline entity thus links are invalid.
ODataService.zip
The text was updated successfully, but these errors were encountered: