I came across an issue with HTTP PATCH requests containing inline entities and what is the expected behavior according to the standard. Image the following scenario:
The entity SHALL NOT contain related entities as inline content. It MAY contain binding information for navigation properties. For single-valued navigation properties this replaces the relationship. For collection-valued navigation properties this adds to the relationship. http://docs.opengeospatial.org/is/15-078r6/15-078r6.html#66
and (from the test suite section)
For each SensorThings entity type send an update request with PATCH that contains related entities as inline content, check if the service fails the request and returns appropriate HTTP status code.
http://docs.opengeospatial.org/is/15-078r6/15-078r6.html#97
I would assume that this should fail (although I was not able to find the expected status code).
According to the first quote I assume that something like this should however work
HTTP PATCH .../Things(3)
{
"Locations": [
{
"@iot.id": 2
}
]
}
Are my assumptions on this correct? If so, would it be correct to say that inline entities are only allowed in HTTP PATCH if they contain exactly one property which is @iot.id ?
I came across an issue with HTTP PATCH requests containing inline entities and what is the expected behavior according to the standard. Image the following scenario:
Preconditions
HTTP PATCH .../Things(3)
What is expected result here? According to
and (from the test suite section)
I would assume that this should fail (although I was not able to find the expected status code).
According to the first quote I assume that something like this should however work
HTTP PATCH .../Things(3)
Are my assumptions on this correct? If so, would it be correct to say that inline entities are only allowed in HTTP PATCH if they contain exactly one property which is
@iot.id
?