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

Extra Properties not advertised in Metadata if added to Payload are not serialized unless it is exposed as OpenType #179

Closed
hotchandanisagar opened this issue May 7, 2015 · 2 comments
Milestone

Comments

@hotchandanisagar
Copy link

11.4.1.3 Handling of Properties Not Advertised in Metadata
Clients MUST be prepared to receive additional properties in an entity or complex type instance that are not advertised in metadata, even for types not marked as open. By using PATCH when updating entities, clients can ensure that such properties values are not lost if omitted from the update request.

Possible workaround was to do disable the EnableFullValidation setting but ciurrently wouldn’t enable you to add extra properties to payload during serialization.

https://github.com/OData/odata.net/blob/master/src/Microsoft.OData.Core/JsonLight/ODataJsonLightPropertySerializer.cs#L190
For now, only open type would allow extra properties in serialization.

There does not seem to be support in the ODL and WebAPI.

@hotchandanisagar hotchandanisagar changed the title Extra Properties not advertosed in Metadata if added to Payload are not serialized unless it is exposed as OpenType Extra Properties not advertised in Metadata if added to Payload are not serialized unless it is exposed as OpenType May 7, 2015
@karataliu
Copy link
Contributor

@hotchandanisagar Thanks for the investigation.

I think you've got the right place, looks like we can check EnableFullValidation flag and bypass such validation here. Would you please send a pull request for this?

@congysu
Copy link
Contributor

congysu commented Dec 1, 2015

The PR #218.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants