Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support property without property value #1301

Open
xuzhg opened this issue Aug 23, 2024 · 2 comments · May be fixed by #1302
Open

Support property without property value #1301

xuzhg opened this issue Aug 23, 2024 · 2 comments · May be fixed by #1302
Assignees
Labels

Comments

@xuzhg
Copy link
Member

xuzhg commented Aug 23, 2024

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,
    "[email protected]":123,
    "[email protected]":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.

@xuzhg xuzhg added the bug Something isn't working label Aug 23, 2024
@julealgon
Copy link
Contributor

What do you mean by this one @xuzhg ? Can you add a simple description/example?

@xuzhg
Copy link
Member Author

xuzhg commented Aug 24, 2024

What do you mean by this one @xuzhg ? Can you add a simple description/example?

I can't catch up your speed. :)

@xuzhg xuzhg added feature and removed bug Something isn't working labels Aug 24, 2024
@xuzhg xuzhg self-assigned this Aug 24, 2024
@xuzhg xuzhg linked a pull request Aug 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants