wrstudios / odata4

Simple OData V4.0 Library for Ruby
Other
2 stars 2 forks source link

Lenient property validation #3

Closed PandaWhisperer closed 6 years ago

PandaWhisperer commented 6 years ago

We've encountered several OData service implementations that deliver data that violates the metadata declaration.

For instance, one service uses plenty of EnumTypes, which are all declared as not allowing NULL values. However, in the data, many enum properties have a value of 0, which is not declared as a valid enum member. According to the developers, they use this to mean "no data".

While that's obviously a violation of the specs, we can't wait for (or even expect) others to change and get it right.

Instead, we need an option to make property validation more lenient (i.e. log warnings instead of raising exceptions).