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

On Tuesday, April 14, 2015 8:45 PM, Gregg Kellogg wrote:
> > On Apr 14, 2015, at 2:30 AM, John Walker <john.walker@semaku.com> wrote:
> >
> > Hi Jonathan,
> >
> > Maybe check out this section of the spec:
> > http://www.hydra-cg.com/spec/latest/core/#discovering-a-hydra-powered-web-api
> >
> > So you could use an HTTP Link header to point to a resource that would be a Hydra
> document.
> >
> > As the rdfs:range of hydra:apiDocumentation property is the hydra:ApiDocumentation
> class, you can entail that anything linked to with this relation is a Hydra document.
> >
> > You could also use the same hydra:apiDocumentation property in some JSON to link out
> to a list of documents.

Yep, hydra:apiDocumentation is basically a link relation type (rel) that you can use to reference Hydra API docs.


> IMO , the way to know you’re accessing Hydra Documentation is to look for something of
> type hydra:ApiDocumentation. Note that this is not necessarily a JSON-LD document
> unless you explicitly request that format; I might well provision a Hydra API and support
> text/turtle as a mime type, both for the documentation and the interface itself. Of course,
> most would probably use another serialization such as JSON-LD, and saying Accept:
> application/ld+json is the way to signal that.

+1

I thought about using profiles for Hydra but the just in case JSON-only clients need to work with it. The idea would basically be to define a "canonical" format so that clients that aren't able to process it as JSON-LD could also work with a Hydra API doc. I'm not sure there are really tangible benefits in this and so I tabled the idea (for now).


Cheers,
Markus


--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 15 April 2015 19:40:11 UTC