You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1795 added the @reverse property to the JSON-LD API. But, when an object doesn't have subjectValuesForReverse() the resulting JSON-LD will have @reverse: [] making the JSON-LD invalid.
If the node object contains the @reverse key, its value MUST be a JSON object containing members representing reverse properties. Each value of such a reverse property MUST be an absolute IRI, a relative IRI, a compact IRI, a blank node identifier, a node object or an array containing a combination of these.
#1795 added the
@reverse
property to the JSON-LD API. But, when an object doesn't havesubjectValuesForReverse()
the resulting JSON-LD will have@reverse: []
making the JSON-LD invalid.I ran into this issue when processing the API's JSON-LD with https://json-ld.org/playground/ and https://www.easyrdf.org/converter. According to https://json-ld.org/spec/latest/json-ld/:
A possible fix would be to change
omeka-s/application/src/Api/Representation/AbstractResourceEntityRepresentation.php
Line 123 in d167dde
(count($reverse)>0?['@reverse' =>$reverse]:null)
where
$reverse=$this->subjectValuesForReverse();
is added beforeomeka-s/application/src/Api/Representation/AbstractResourceEntityRepresentation.php
Line 110 in d167dde
The text was updated successfully, but these errors were encountered: