Closed hylkevds closed 5 years ago
I found the answer in a different section:
If the property is single-valued and has the null value, the service SHALL respond with 204 No Content.
Also GET v1.0/Observations(1)/validTime
should already return 204 No Content, and not the property with a null value.
Is this important enough for a test in the conformance suite? If not we can close this issue.
Take an Observation with id 1, which has no validTime. What should the response be to the request
GET v1.0/Observations(1)/validTime/$value
The request without $value is clear:
GET v1.0/Observations(1)/validTime
returns{"validTime": NULL}
However, since $value returns the raw value, we can't return NULL, since that would mean a String value of "NULL", not "this property does not have a value".
Options:
Option 2 seems good, since it allows the distinction between "404: this Observation does not exist" and "204: this observation exists, but this observation does not have this property".
Any other opinions?