I have some old code which exposes services on a web API which works basically on HTTP verbs. I'd like to move this project to use hypermedia controls (HATEOAS). I'm wondering if there are any libraries already that support embedding links in resource representation for sub resources in accordance with HAL or JSON-LD specs. I've googled around but I couldn't find anything. It would be good to know if one of the mature projects like Yesod, Snap or Happstack are planning on supporting this feature?
Edit: To clarify, I'm interested in level 3 of the REST Maturity Model
Have you seen HAL before? It's a specification format for hypermedia objects. The github wiki for the spec has a list of libraries but I don't see any haskell libraries on there.
However, a quick google turns up https://github.com/talios/haskell-hal. Doesn't look super popular, but maybe after reading about HAL you'll contribute, fork it, or launch your own!
The json-api package purports to offer some support for HATEOS. This is the output of this example code demonstrating how you might generate a HATEOS/HAL style response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With