HydraCG / Specifications

Specifications created by the Hydra W3C Community Group
Other
138 stars 26 forks source link

Documentation with wrong type in examples #205

Closed phe-sto closed 3 years ago

phe-sto commented 4 years ago

EXEMPLE 16 (http://www.hydra-cg.com/spec/latest/core/#example-16-a-hydra-partialcollectionview-splits-a-collection-into-multiple-views) EXEMPLE 15 (http://www.hydra-cg.com/spec/latest/core/#example-15-referencing-related-resources-using-a-hydra-collection)

For collection count use a number as string. But the JSON-LD vocabulary specify totalItems as an integer:

{ "@id": "hydra:totalItems", "@type": "rdf:Property", "comment": "The total number of items referenced by a collection.", "domain": "hydra:Collection", "label": "total items", "range": "xsd:integer", "status": "testing" }

That is I think an inconsistency. I suppose it should be an integer in the examples.

Best regards

alien-mcl commented 4 years ago

Hmm. Indeed having a numeric literal rather than string feels more consistent and readable. Vocabulary defines range as xsd:integer so using a number here would be interpreted by JSON-LD processor as xsd:integer mentioned.

I'll try to setup a PR for that!

alien-mcl commented 3 years ago

I believe PR #220 resolves this issue