Support property without property value
@xuzhg is already working on this.
Since Aug 24, 2024.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Assemblies affected
Which assemblies and versions are known to be affected e.g. ASP.NET Core OData 9.x
Describe the bug
ODL supports to read the property without value. Here's an example:
{
"@odata.context":"http://localhost/$metadata#Customers/$entity",
"CustomerID": 17,
"Name@Custom.PrimitiveAnnotation":123,
"Name@Custom.BooleanAnnotation":true,
"Location": { "Street":"154TH AVE"}
}
where, the property 'Name' only contains the instance annotations.
ODL can read the above properties and output the 'ODataReaderState.NestedPropertyInfo' in the reading pipeline.
The ASP.NET Core OData payload reading process doesn't handle the "NestedPropertyInfo", that means the properties without value are ignored. The result is that the end user can't handle such properties even he customizes the resource deserializer.
Additional context
Be noted, so far ODL 8.1 also reads the 'primitive type property without value into the 'ODataResourceBase.Properties', but not for other type properties.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.