Closed
Description
When JSON Lite payload contains @odata.context annotation with relative URL instead of absolute URL OData .NET client fails to deserialize response.
Assemblies affected
OData .Net lib 7.5.0.
Reproduce steps
Read response with relative URL in @odata.context annotation. (Use Fiddler Autoresponder?).
Expected result
Client should deserialize response as usual.
Actual result
Client fails with following error:
Microsoft.OData.ODataException: 'The top level context URL '$metadata#FooBar' should be an absolute Uri.'.
Additional detail
According to OData V4 spec:
The context annotation returns the context URL (see [OData-Protocol]) for the payload. This URL can be absolute or relative.
This output comes from Java Olingo implementation and we are blocked by this issue right now.