Closed SpeckiJ closed 2 years ago
Thank you for opening the issue here! Also probably still in time for a fix in 1.1 :)
Since you mentioned you also think implicit selection of expanded navigation properties makes sense, I suggest we change the listed order of $select and $expand. We may also want to update example 2 to use this implicit selection, and explicitly mention it.
Interestingly, this changed from OData V3 to V4. See: V3: https://services.odata.org/V3/OData/OData.svc/Persons?$format=application/JSON&$expand=PersonDetail&$select=ID V4: https://services.odata.org/V4/OData/OData.svc/Persons?$expand=PersonDetail&$select=ID
In the STA SWG meeting on 2020-09-10, the SWG agrees to follow the OData v4 pattern. @hylkevds will draft the fix in v1.1 for the SWG to review.
PR Made: https://github.com/opengeospatial/sensorthings/pull/107 Also added to the AllChanges PR. Resulting document: HTML PDF
Best to leave it open until the PR is actually merged, after the SWG has had a look at the details of the proposed changes.
Fixed with the publication of Sensing v1.1.
This Issue is based on a discussion in the STA Grafana Dashboard Plugin: https://github.com/linksmart/grafana-sensorthings-datasource/issues/36 Transferred here as it is a more general discussion.
Problem Statement: The STA apparently does not clearly define (as there is discussion about it) whether the fact that Section 9.3.1 states that
$select
binds stronger than$expand
also means that all expanded Properties need to be explicitly listed in the$select
statement, or are implicitly included. See the original Discussion in the link above for concrete examples.As mentioned by @hylkevds in the original discussion the OData Spec notes that they are implicitly selected
While the Specification example shows them being selected explicitly
I have checked the Implementations (those known to me) and they seem to be split on this.
Has implicit
$select
: GOST, FROST (I assume - correct me if I'm wrong @hylkevds) Needs explicit$select
: SensorUp (gathered from Demo Instance here), 52°North STADisclaimer: I am professionally involved in the development of the 52°North STA.