Closed tripu closed 9 years ago
Hi @tripu, for links the name
and title
properties have different meanings and are used correctly in the above examples. Note that there is a difference between "name" being used as a resource property and "name" being used in the context of a HAL link object.
See the "5.5. name" and "5.7. title" properties of Link objects in HAL.
Thanks, @vivienlacourba. I think I get it.
I guess for every {title, href}, I should request that href, and from THAT result, use the field "name"...
Assigning this pseudo-issue to myself to double-check that that is all I need in Apiary; will follow up.
In the API, field names
name
andtitle
seem to be used indistinctively.An example: in the data returned by
https://api-test.w3.org/domains/41381?embed=true
, the name of the domain is insidename
; but the name of the domain lead is inside_links.lead.title
(not_links.lead.name
).Another example: in
https://api-test.w3.org/users/ggdj8tciu9kwwc4o4ww888ggkwok0c8?embed=true
, the name of the user is insidename
; but inhttps://api-test.w3.org/users/ggdj8tciu9kwwc4o4ww888ggkwok0c8/specifications?embed=true
, the name of the first spec is inside_embedded.specifications[0].title
(not_embedded.specifications[0].name
).A consistent choice would help Apiary and other HATEOAS clients. Right now, Apiary has to check both fields when it expects a field to contain “the name of something”.
I suggest we always use
name
; I think it's the most generic term, and it's OK for people, groups, institutions, documents, etc.