OData / odata.net

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

Feature gap: enable untyped for ODataResourceValue and ODataCollectionValue #2994

Open xuzhg opened 4 weeks ago

xuzhg commented 4 weeks ago

Short summary (3-5 sentences) describing the issue.

Assemblies affected

Which assemblies and versions are known to be affected e.g. OData .Net lib 7.x

Reproduce steps

Supposed we have an instance annotation, whose value is an ODataResourceValue, and its type name is null or 'Edm.Untyped'.

ODataResourceValue resourceValue = new ODataResourceValue {
    TypeName = "Edm.Untyped",
    Properties = ....
};

Supposed we have an instance annotation, whose value is an ODataCollectionValue, and its type name is null or 'Collection(Edm.Untyped)'.

ODataCollectionValue collectionValue = new ODataCollectionValue {
    TypeName = Collection("Edm.Untyped"),
    Items= ....
};

ODL should write those values correctly.

Expected result

ODL should write those values correctly.

Actual result

ODL can't write those values correctly.

Additional detail

Optional, details of the root cause if known. Delete this section if you have no additional details to add.