HydraCG / Specifications

Specifications created by the Hydra W3C Community Group
Other
139 stars 25 forks source link

Allow hydra:returns on IriTemplate? #50

Open lanthaler opened 10 years ago

lanthaler commented 10 years ago

See http://lists.w3.org/Archives/Public/public-hydra/2014Jun/0080.html

tpluscode commented 6 years ago

I think this is not such a great idea to overload hydra:returns. Currently is has rdfs:domain set to hydra:Operation and it makes perfect sense. The template itself is not what "returns" anything.

I think we need a specialised property for that, or encourage the use of GET. Maybe combined with schema:FindAction?

{
  "@type": "IriTemplate",
  "template": "http://example.com/person{?name}",
  "operations": [
    {
      "@type": [ "Operation", "schema:FindAction" ],
      "method": "GET",
      "returns": "ex:Person"
    }
  ]
}