Closed (works as designed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
hal.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Feb 2013 at 16:31 UTC
Updated:
9 Mar 2017 at 13:48 UTC
Jump to comment: Most recent
Comments
Comment #1
clemens.tolboomPlease add some example use cases. Why would one want to 'inject' links? What client needs are resolved by this?
What 'steps to reproduce' are needed? Preferably a curl command.
Sound trivial to build right?
Slightly related #1964034: Pass entity_type into Serializer via context
Comment #2
Crell commentedLink relationships are fundamental to HATEOAS/REST semantics. Various body formats like HAL have ways to define those link relationships. There's also an IETF RFC to specify them as an HTTP header. That's what this issue is asking about.
Comment #3
clemens.tolboomAdded link to https://tools.ietf.org/html/rfc5988#page-6 and https://tools.ietf.org/html/rfc5988#page-9
Comment #4
Crell commentedActually, looking this over again I'm not sure I understand it. Lin, which headers are you talking about passing in...? I can absolutely see us *generating* Link headers, but consuming them doesn't really make sense. We're not consuming HAL at all (which has links), just generating. Can you even have Links in a Request message?
This is probably 8.1.x material now, too.
Comment #5
wim leersIt sounds like this is also about using Serializer context, #1964034: Pass entity_type into Serializer via context and #2568413: REST views: Pass views style plugin instance to REST Export serializer are too.
Comment #9
wim leers#4 wrote almost 2.5 years ago that he didn't understand it.
And now that #2854830: Move rest/serialization module's "link manager" services to HAL module moved the existing link manager from the REST module to the HAL module where it belongs (because all of it is entirely coupled to the HAL normalization), this is also something that would clearly belong in the HAL component.