w3c / activitypub

http://w3c.github.io/activitypub/
Other
1.21k stars 77 forks source link

Change some `endpoints` properties from `@type: @id` to `@type: xsd:anyURI` #375

Open trwnh opened 1 year ago

trwnh commented 1 year ago

In #368 I tangentially asked if the various endpoints should be @type: @id or perhaps something else like @type: xsd:anyURI or the default @type: @value.

@id is specifically intended for linked data nodes on the linked data graph. The endpoints defined in the normative context all use @type: @id, but as far as I can tell, they are not intended to be nodes on an RDF graph.

Example expansion with either default type or anyURI type would look something like this:

"https://www.w3.org/ns/activitystreams#proxyUrl": [
  {
    "@type": "http://www.w3.org/2001/XMLSchema#anyURI",  // this would be left out
    "@value": "https://example.com/proxyUrl"  // this would currently be id instead of value
  }
]

Some other terms are also questionably not pointing to node identifiers.


In summary, we consider the following endpoints:

And also the following properties:

evanp commented 12 months ago

So, this is a good point; changing those values to a xsd:anyURI would make some sense and avoid some possible mistakes. This is exactly the kind of technically normative change, supported by the text of the specification and common usage, that an updated version of ActivityPub should include. I'm marking this as "postponed" so that we remember to review it if a working group for AP is chartered in the future.

trwnh commented 5 months ago

partial update now that i know more about JSON-LD/RDF

so the proper thing to do seems to be

i think 1+3 would be best. but this is an issue more for activitystreams than it is activitypub, so i'll file these two points there

evanp commented 1 week ago

We are leaving this issue open, but only for the specific set of properties in the endpoints array. This should be dealt with in a future version of the AP context document, bringing the context in line with the AP spec text.

Also tagging for a Primer page for how to use @id and xsd:anyURI in extensions.

trwnh commented 1 week ago

Tagging in this StackOverflow answer that has more information about the IRI/xsd:anyURI split

https://stackoverflow.com/a/75603513