-
Notifications
You must be signed in to change notification settings - Fork 3
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
Omission of collection-valued action parameters #2045
Comments
For collection-valued parameters nullable expresses whether Given that, omission of a collection-valued parameter means "sender has no opinion, receiver can fill in a default", which may be an empty collection. |
Note: a collection-valued parameter is never nullable (nullable=true references the members of the collection-valued parameter, not the parameter itself). Therefore, the statement on nullable non-binding parameters doesn't apply. In https://oasis-tcs.github.io/odata-specs/odata-csdl-xml/odata-csdl-xml.html#Parameter, we need to update the meaning of nullable in order to cover collection valued parameters, consistent with the json description. |
2025-2-12: discussed treating an absent collection valued parameter as up to the service (equivalent to an optional parameter with no defined value), including returning an error. This is arguably the most useful and flexible, and the most backward compatible. General agreement that this is a reasonable direction. Heiko will come back with a proposed change. Also: we noted that text on omit-null shouldn't apply to collection-valued properties (since they are not nullable) but the wording could be made crisper. Heiko will look at this as well. Thanks Heiko! :-) |
Discussed proposed change. Consensus was that we didn't need to call this out in the vocabulary and should simplify wording to say just that the behavior was up to the server. However, if the parameter is marked as optional its absence should not raise an exception. |
OData-JSON, section 18 states
This statement cannot apply to collection-valued parameters, because they can at most be interpreted as having an empty collection as value. Is this meant here?
Conversely, can an empty array be omitted in a response, similar to
omit-values=nulls
?The text was updated successfully, but these errors were encountered: