5 ms·
I don't think adding metadata to your responses goes against the ideas of HATEOAS. On the contrary, HATEOAS requires enough metadata about the application stat
by DropkickM16 14y ago
I don't think adding metadata to your responses goes against the ideas of HATEOAS. On the contrary, HATEOAS requires enough metadata about the application state and possible transitions so that a consumer can fully interact with the API without relying on out-of-band information (URL patterns being the most common example).
- thelarry 14y agoSome people argue that whatever you get back from the request should be the exact json/xml/whatever object representation.
- DropkickM16 14y agoCan you point me to a source for this argument? I'd be interested in taking a look at the reasoning behind it. Obviously, that's an approach that a lot of people take for pragmatic reasons, but it doesn't seem to allow the kind of hyperlinking that's the core idea of HATEOAS. Of course, the term "object representation" is pretty generic, and may obviously somehow include links to related resources and application states.
- rfugger 14y agoI doubt Fielding would agree: "The model application is therefore an engine that moves from one state to the next by examining and choosing from among the alternative state transitions in the current set of representations." http://weblogs.java.net/blog/mkarg/archive/2010/02/14/what-hateoas-actually-means http://weblogs.java.net/blog/mkarg/archive/2010/02/14/what-h...