Documentation with wrong type in examples
Closed this issue · 2 comments
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
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!