shexSpec / primer

ShEx primer
MIT License
7 stars 5 forks source link

Example for "value shape" uses unsupported JSON key #20

Closed tombaker closed 3 years ago

tombaker commented 3 years ago

In 3.1. Node Constraints, the example for "value shape" reads:

{ "my:IssueShape": { "type": "Shape",
  "expression": { "type": "TripleConstraint", "predicate": "ex:reportedBy",
      "value": { "type": "ShapeRef", "reference": "my:PersonShape" } } } }

However, there is no mention of the key "reference" in the ShExJ grammar.

ericprud commented 3 years ago

Before we updated ShExJ to be more JSON-LD-friendly, it used a ShapeRef structure to reference other shapes. The JSON-LD update replaced that with a JSON-LD @id, e.g. {"type":"ShapeRef","reference":"http://...Shape1"} became "http://...Shape1". 9d95471 fixes this. I pushed that to master and extends.

Please close if appropriate.

tombaker commented 3 years ago

@ericprud This looks good but the ShapeRef structure still dispays on shex.io/shex-primer ...?

ericprud commented 3 years ago

I just patched http://shex.io/shex-primer-20191009 with 9d95471.

Look good?

tombaker commented 3 years ago

Looks good - thanks.