Heracles.ts icon indicating copy to clipboard operation
Heracles.ts copied to clipboard

Decide on "hypermedia removal"

Open lanthaler opened this issue 8 years ago • 2 comments

Should Heracle's remove hypermedia controls from the payload or not? If so, should it do so optionally? Or should this be done at a higher layer?

lanthaler avatar Jul 07 '17 07:07 lanthaler

I think that Heracles should not remove hypermedia. I'd keep the representation as close as possible to the vocabulary to lower the barrier of entry. Principle of least astonishment and whatnot. IMO, removal should be up to another component it so desires.

tpluscode avatar Jul 10 '17 16:07 tpluscode

Current implementation by default strips of the hypermedia controls from the original resource's payload, but this behavior is driven with a single bool flag which can be set to false as a default. JsonLdHypermediaProcessor implemented now traverses the response and adds hypermedia to the separate object which is then framed so no other data leaks to the public API. I'm OK with having a default behavior that leaves the hypermedia in the original payload. I can give it a try and just reframe the resource to obtain hypermedia (without traversing it) but publicly available objects will have non-hypermedia related stuff.

alien-mcl avatar Jul 10 '17 19:07 alien-mcl