Action: various questions (container thread)

Hi,

I start work on compiling review of how Schema.org, Activity Streams 2.0
and Hydra model Activity/Action/Operation, Handler/EntryPoint. I
aim to have it at useful stage before Wednesday session with Social WG
at TPAC, preferably already on Tuesday. I'd like to gather all relevant
questions on this thread to avoid creating noise on the list.

My first question relates to reason for creating sub properties of
http://schema.org/result

Currently only one of them exists http://schema.org/resultReview
(domainIncludes: ReviewAction, rangeIncludes: Review). I don't
understand the need for defining it instead of just using generic result.

It looks to me possibly somehow related to hydra:expects and hydra:returns
http://www.hydra-cg.com/spec/latest/core/#adding-affordances-to-representations

"While links are enough to build read-only Web APIs, more powerful
affordances are required to build read-write Web APIs. Thus, Hydra
introduces the notion of operations. Simply speaking, an Operation
represents the information necessary for a client to construct valid
HTTP requests in order to manipulate the server's resource state. As
such, the only required property of an Operation is its HTTP method.
Optionally, it is also possible to describe what information the server
*expects* or *returns*, including additional information about HTTP
status codes that might be returned."


In http://schema.org/docs/actions.html
Example: Movie review site API with -input and -output

Current published version of that example uses ReviewAction as both -
request and response. I would find it more intuitive to expect Review
and return either Review or Error.

request
POST https://api.example.com/review

{
  "@type": "Review",
  "itemReviewed": "http://example.com/movies/123",
  "reviewBody": "yada, yada, yada",
  "reviewRating": {
    "@type": "Rating",
    "ratingValue": "4"
  }
}

response: same Review just with @id or Error

Cheers!

Received on Monday, 27 October 2014 00:17:39 UTC