subject of potentialAction as implied target of Action? (+ @id / url)

Hello,

I fiddle with an example of a Comment which one can like, comment on and
perform some other actions/operations.

{
    "@type": "Comment",
    "@id":
"https://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a",
    "url":
"http://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a",
    "sameAs": "http://tiny.cc/ob4oox",
    "about": "http://tmblr.co/ZxcvMv1UViUDg",
    "author": "https://wwelves.org/perpetual-tripper",
    "text": "most web APIs nowadays use JSON, with JSON-LD we can ..."
    "potentialAction": [
      { "@type": "LikeAction"},
      { "@type": "CommentAction" }
    ]
  }
}

I would like to use URI of this comment itself as default target for
values of potentialAction it advertises, Somehow to infer:

{
    "@type": "Comment",
    "@id":
"https://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a",
    ...,
    "potentialAction": [
      {
        "@type": "LikeAction",
        "target": "@id":
"https://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a"
      },
      {
        "@type": "CommentAction",
        "target": "@id":
"https://wwelves.org/perpetual-tripper/61f671f7-5fb5-452a-bccf-153ac5c31b1a"
      }
    ]
  }
}

Would that maybe make sense as a general convention?

It also make sense to me then to take advantage of distinct *@id* and
*url*. Thing could use *@id* for URI, possibly providing REST
(+Hypermedia) API with *Content Negotiation* etc. While using *url* for
static version like generated static sites or those relying on CDN.
Please notice in my example comment i used distinct *https* for @id and
*http* for url.
One could also use in deployments patterns like api.domain.tld/{?uuid}
for *@id* and www.domain.tld/cute/slug for *url*, of course remembering
to consider them opaque.

o/

Received on Tuesday, 4 November 2014 02:16:23 UTC