mozilla-sensorweb / sensorthings

Node implementation of the OGC SensorThings API
Mozilla Public License 2.0
14 stars 9 forks source link

[Query options] Implement multi-level relations for $expand. #185

Closed ferjm closed 7 years ago

ferjm commented 7 years ago

We need to support queries like http://example.org/v1.0/Things?$expand=Datastreams/ObservedProperty as defined in the standard:

Additionally, each navigation property can be followed by a forward slash and another navigation property to enable identifying a multi-level relationship.

isabelrios commented 7 years ago

Would these cases, adding a system query option, also be covered by this issue?: Ex: http://example.org/v1.0/Datastreams(1)?$expand=Observations($filter=result eq 1) http://example.org/v1.0/Datastreams(1)?$expand=Observations($orderby=result) ... Or should we open a new issue? Currently the response is: {"code":400,"errno":104,"error":"Bad Request","message":"$expand"}

albertopq commented 7 years ago

Hey @isabelrios, the test cases you are pointing at won't work after this fix. This issue is only for allowing requests like:

/Datastreams(1)?$expand=Observations/FeaturesOfInterest

Thanks!

ferjm commented 7 years ago

Fixed by #224