RE: What is the correct media-type for a Hydra specification?

On 19 Apr 2015 at 00:41, Erik Wilde wrote:
> On 2015-04-18 11:03, Dietrich Schulten wrote:
>> A server which supports RDF-based resources can express possible restful
>> interactions in at least three ways (I know of):
>> - LDP (mainly for CRUD-style interaction)
>> - Schema.org actions
>> - Hydra
>> As a client, how can I request an interaction style I support? As a
>> server, how can I avoid to lump all representations into my responses to
>> make sure every RDF client understands me?
> 
> thanks, that's exactly the point i am trying to make.

I don't think media types are the best solution in such a case. I'd fine a design based on the Prefer HTTP header [1] better suited for such use cases. It could be used to express vocabulary preferences. If there's enough interest, I could write a draft to register a "vocabulary" preference.


> if the media type
> only signals the metamodel (and maybe the serialization of it, but
> that's a different issue), but the represented domain model is hidden
> from the uniform interface, you lose the ability to talk about it.

You lose the ability to talk about it in terms of media types. There are many other ways to talk about these things though.


> that's unfortunate, and the main reason why REST asks for resources to
> be self-describing. and that means in terms of domain models in the
> uniform interface, so that interactions can be built around exposing
> those, and acting on them.

Even with the generic media type resources are completely self-describing. Why wouldn't they be?


[1] http://tools.ietf.org/html/rfc7240

--
Markus Lanthaler
@markuslanthaler

Received on Tuesday, 21 April 2015 20:22:05 UTC