You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is quite a few oData services out in the wild that we are unable to connect to with these client libraries because they return the value null for properties marked as being a collection. Apparently even Microsoft's own software does this. In all realty, most developers could care less if a collection was returned as being null in the response. If the server does not respond with the property in the response at all, the collection is still null but no error is thrown.
That does not do anything for client side to ignore anything, that example shows how to send a custom header to a custom server to tell the server to not return null values.
As per the OData spec collections should not be null but can be empty that's why we validate this. But as @mikepizzo suggested to improve user experience, we can have an opt-in flag that ignores some of these validations.
There is quite a few oData services out in the wild that we are unable to connect to with these client libraries because they return the value null for properties marked as being a collection. Apparently even Microsoft's own software does this. In all realty, most developers could care less if a collection was returned as being null in the response. If the server does not respond with the property in the response at all, the collection is still null but no error is thrown.
We need to be able to tell the client to ignore this specific issue and not to throw an error when parsing the oData response.
It stems from this method.
https://github.com/OData/odata.net/blob/main/src/Microsoft.OData.Core/ReaderValidationUtils.cs#L1171
The text was updated successfully, but these errors were encountered: