Open nickevansuk opened 6 years ago
Why item
and not items
? Feels like a plural for an array makes more sense?
@nickevansuk this looks good to me. And the id
and type
fields are consistent with e.g. the modelling spec
@civsiv it being singular would be consistent with e.g. activity
in an Event, which can be either a single activity or array. Or subEvent
But we use items
for /v2/sessions, /v2/activities, etc. Shouldn't they all be consistent?
Great! Yes good spot: all schema.org props are singular (see https://www.w3.org/wiki/WebSchemas/Singularity for rationale), the previous prototype was incorrect in this regard.
Use Case
Provide a pattern for listing resources while querying a resource collection.
Proposal
Use Hydra Collections, except instead of using the "
member
" property for the list of resources, use "item
", as the term "member
" has a specific meaning within the sport and physical activity sector, anditem
is consistent with the existingtotalItems
property.Example
See also