- From: Tomasz Pluskiewicz via GitHub <sysbot+gh@w3.org>
- Date: Mon, 19 Mar 2018 20:15:48 +0000
- To: public-hydra-logs@w3.org
tpluscode has just created a new issue for https://github.com/HydraCG/Specifications: == Expressing actions (#154) within ApiDocumentation == On today's call we discussed that the premise of PR #154 is to allow, as the title states, performing requests on a different target. That is, as opposed to `hydra:Operation` which always assumes that the target will be the object of a `?s hydra:operation ?o` triple. Taking advantage of `supportedProperty` and `supportedOperation` combined should make it also possible. Let's have a car resource, linked to a steering wheel: ``` json { "@type": [ "ex:Car" ], "@id": "/the/car" "ex:steeringWheel": { "@id": "/the/wheel" } } ``` We can currently define the ApiDocumentation so that any occurrence of `ex:steeringWheel` implies that it's subject will support given operations: ``` json { "supportedClass": { "@id": "ex:Car", "supportedProperty": { "@id": "ex:steeringWheel", "supportedOperation": [ { "@type": "ex:TurnLeftOperation" }, { "@type": "ex:TurnRightOperation" } } } } ``` This way any subject of `?car ex:steeringWheel ?subject` will be a assumed a valid for the turn operations, regardless of it's precise class. I think it should be also allowed to have an `IriTemplate` in place of `/the/wheel` ``` json { "@type": [ "ex:Car" ], "@id": "/the/car" "ex:steeringWheel": { "@type": "IriTemplate" } } ``` @lanthaler please confirm I'm not inventing my own Hydra here. @elf-pavlik how would similar be expressed with ApiDocumentation and the actions being discussed in #154 Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/160 using your GitHub account
Received on Monday, 19 March 2018 20:15:52 UTC