Re: [Specifications] CreateAction with HTTP PUT

> I'll try to stick to Statement (Triple or Quad) and s, p, o in all further comments!

Sort of agree because remember, not all readers here will be RDF-savvy.

> I would like us to consider also providing such option in Hydra.

It is there already in the form of **adding operations to linked resources**.

> Does it mean that in UC#1 Entry point we would have to add statement </api/events> hydra:addMember </api/events> ?

I don't think that would be necessary because you already have the `PUT` operation with appropriate type. And again, that predicate was purely for the example's sake. We could define one in hydra (akin `hydra:search`) but it could also be any other API-specific link because it has limited semantics. What the client is actually interested in are the operations.

> In case when that resource or template advertises more than one instances of hydra:Operation, how the client knows which of those operations to choose?

This is a good question but maybe a little vague. The real question is what are the client's requirements  expectations. For starters, an operation already contains some information: the `@type`(s), the `expects`, the `method`. 

I wouldn't want to cram much more in the core specification. Any more elaborate metadata should IMO be outside of our scope and become some extension of Hydra Core

> It seems like clients needs to follow those two steps

Actually, I was thinking of a single step albeit requiring recursion:

1. Find `schema:CreateAction` in any recursively linked resource but only operation which `expects: schema:Event`. In SPARQL you'd have two pattern:

        `?operation rdf:type schema:CreateAction ;
                    hydra:expects schema:Event`

See how I drafted that in PR #143

> IMO we should only rely statements using terms from Hydra vocab and something like schema.org actions and don't try to infer things from some particular choice of HTTP methods.

Ver much so! The HTTP method is just an implementation detail and we shouldn't encourage

-- 
GitHub Notification of comment by tpluscode
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/141#issuecomment-340159381 using your GitHub account

Received on Saturday, 28 October 2017 08:25:20 UTC