odata.net icon indicating copy to clipboard operation
odata.net copied to clipboard

ODataLib Client fails to deserialize payload with @odata.context relative URL starting with ../

Open Devmawi opened this issue 9 months ago • 3 comments

I have a project where I want to integrate a SAP CAPs with a .NET OData Client. Querying and write operations called from the data service context like DataServiceContext.AddToSomeEntity(newEntityInstance) are not a problem. But if I want to insert related entities I got an error while the response is parsed, because the context url looks like @odata.context": "../$metadata#SomeEntity.

And the code changes for the issue ODataLib Client fails to deserialize payload with @odata.context relative URL seems only to fix the case if url starts with $metadata.

Used Microsoft.OData.Client version 7.21.1.

Devmawi avatar May 23 '24 08:05 Devmawi