camaraproject / DeviceLocation

Repository to describe, develop, document and test the DeviceLocation API family
Apache License 2.0
21 stars 32 forks source link

Consistency problem in Location retrieval regarding lastLocationTime cardinality #197

Closed bigludo7 closed 3 months ago

bigludo7 commented 4 months ago

Problem description Seem that we have still a consistency problem in Location retrieval.

API documentation indicates: In this case the system may still return lastLocationTime, if available. see line 40

While the attribute lastLocationTime is mandatory in location retrieval response

Expected behavior

Shift lastLocationTime to optional

Alternative solution Change documentation to may to must

Additional context

alpaycetin74 commented 4 months ago

If maxAge is absent in the request, the server may still return any (last)location it has, even if it cannot determine its timestamp. I would recommend to make lastLocationTime optional to cover the absence of maxAge.

While making the parameter syntactically optional, I would also recommend to add a note that says: The server "should" (maybe "must"?) return lastLocationTime if the client has supplied a maxAge parameter. This is because the server is "responsible" to show it really satisfies the maxAge condition of the client.

jlurien commented 4 months ago

In L20 we also have " Additionally to location information, the answer will also provide indication about the location time."

To me lastLocationtinTime is to be returned always, so in L40, it should say "In this case the system will still return lastLocationTime."

Indicating maxAge is just the threshold to receive an error or a success, which may have impact on charging. If implementations didn't know the value of lastLocationtinTime, it would be impossible to support the input parameter maxAge, so the current logic assumes that the information is always known. Otherwise we would have to design some error scenario for cases where maxAge is provided but implementation does not know the time of location.

bigludo7 commented 4 months ago

If implementations didn't know the value of lastLocationtinTime, it would be impossible to support the input parameter maxAge, so the current logic assumes that the information is always known

Fair point @jlurien So I'm on side to change line 40 to shift may to must. @alpaycetin74 wdyt?

alpaycetin74 commented 4 months ago

If implementations didn't know the value of lastLocationtinTime, it would be impossible to support the input parameter maxAge, so the current logic assumes that the information is always known

Fair point @jlurien So I'm on side to change line 40 to shift may to must. @alpaycetin74 wdyt?

OK, I agree. In that case we can remove the expression "In this case the system may still return lastLocationTime, if available" because lastLocationTime is syntactically mandatory.