OData / odata.net

ODataLib: Open Data Protocol - .NET Libraries and Frameworks
https://docs.microsoft.com/odata
Other
686 stars 349 forks source link

A property with name '[name of property]' was found when reading a top-level resource set. No properties other than the resource set property with name 'value' are allowed. #2876

Open MrtnSys opened 7 months ago

MrtnSys commented 7 months ago

Issue

We are currently migrating Client and Server from OData V2 to OData V4 and get the following exception with several queries in the .NET Maui App:

A property with name '[name of property]' was found when reading a top-level resource set. No properties other than the resource set property with name 'value' are allowed.

Assemblies affected

Visual Studio 2022 Client: Microsoft Maui (.NET 8.0) App Server: Apache Olingo OData Library, Tomcat Server, SAP Database Protocol: OData V4

`

`

Actual result

OData error as result. But Postman shows the desired Json result.

OData V2 with "Microsoft.Data.OData v5.8.5" package did not show that error.

Any help is appreciated.

habbes commented 7 months ago

Hello @MrtnSys could you share sample code or ideally a small project we can use to reproduce the error? Could you also share the error stack trace?