Open trwnh opened 1 year 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.
partial update now that i know more about JSON-LD/RDF
items
and orderedItems
for example. the latter is @container: @list
while the former isn't. (tangentially, the former should be @container:
@set` to avoid a related issue where a single item can lead to coercing the array out completely during compaction)
so the proper thing to do seems to be
href
as xsd:anyUri
(it already is in the spec, it's just the context document that is "wrong" and needs fixing)url
as type:id
, and either:
urlValue
that is typed as xsd:anyUri
as wellhref
to be applicable to Object as well (since the above hypothetical urlValue
would be near-identical to the existing href
, it just has a different id)url
points to a Link node, always. (tangentially, this deals with a related issue https://github.com/w3c/activitystreams/issues/498 where there is ambiguity on whether a uri value encountered is a value or a Link; it is always a Link, and ought to resolve to a node when fetched with content negotiation)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
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.
Tagging in this StackOverflow answer that has more information about the IRI/xsd:anyURI split
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:
Some other terms are also questionably not pointing to node identifiers.
In summary, we consider the following endpoints:
uploadMedia
proxyUrl
oauthAuthorizationEndpoint
oauthTokenEndpoint
provideClientKey
signClientKey
sharedInbox
actually should be kept as@id
because it refers to something that is in theory an OrderedCollection node.And also the following properties:
href
is explicitly onlyxsd:anyURI
(per AS2-Vocab range). It should probably be defined as such in the normative context.url
may be a Link node but it may also be xsd:anyURI (per AS2-Vocab range). I am not sure how this should be expressed in LD. An array is incorrect since it implies both. I don't know how to properly define "either-or" or "any of" types.alsoKnownAs
is intended to provide aliases for the same node, not point to other nodes. I'm not sure what this implies for typing.