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

Instance annotations and control information for a null result #2018

Open
HeikoTheissen opened this issue Oct 24, 2024 · 0 comments · May be fixed by #2019
Open

Instance annotations and control information for a null result #2018

HeikoTheissen opened this issue Oct 24, 2024 · 0 comments · May be fixed by #2019
Labels

Comments

@HeikoTheissen
Copy link
Contributor

HeikoTheissen commented Oct 24, 2024

According to OData-JSON, section 11, an individual property or operation response with value null must be returned as 204 No Content.

I would like to allow an alternative format of 200 OK with empty JSON payload for structured types and

{"@context": "#«primitive type»",
 "value": null}

for primitive types (which was valid in the 4.0 spec).

This is the only way to add instance annotations or control information to the null result.

Use cases:

  • Instance annotation containing messages that occurred during the operation (and which may explain why the result is null). One could even argue that in the presence of instance annotations the result is not null and must thus be represented with a payload.
  • @deltaLink not only for "sets of results", but also for single-valued results. Could be used to obtain changes to individual properties or related entities, and must then also be issued for a null result.
@ralfhandl ralfhandl moved this to Open in OData TC Oct 24, 2024
@ralfhandl ralfhandl added JSON Format JSON Format V4.02 and removed CSDL JSON labels Oct 24, 2024
@HeikoTheissen HeikoTheissen linked a pull request Oct 25, 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
Status: Open
Development

Successfully merging a pull request may close this issue.

2 participants