ActivityPub/Primer/Cardinality of properties

From W3C Wiki

The ActivityPub specification does not define the cardinality (allowed number) of elements of properties defined.

In the Activity Streams Vocabulary, this is called the "functionality" of the property.

The text of the specification refers to these properties in the singular: "the inbox", "the outbox", etc.

But, actor objects that include arrays as the value of these properties are valid JSON-LD and meet the requirements of the namespace document.

Non-normative guidelines for implementers:

  • For maximum interoperability, publishers should not include array values for properties referred to in the singular in the ActivityPub spec, since there is no way for a consumer to decide which value to choose.
  • For maximum interoperability, consumers should be able to process a property with an array value, and should choose an array element to process, or process all. Note that this is poorly-defined behaviour!
  • Publishers that wish to implement alternate streams should add extension properties to represent those elements, or use the `streams` property.

ActivityPub singular references

Property Reference
`inbox` "The inbox is..."
`outbox` "The outbox is..."
`following` "A link to an ActivityStreams collection..."
`followers` "A link to an ActivityStreams collection..."
`liked` "A link to an ActivityStreams collection..."
`streams` "A list..."
`preferredUsername` "A short user name"
`endpoints` "A JSON object..."
`likes` "...a likes collection..."
`shares` "...a shares collection..."

Related Issues

- https://github.com/w3c/activitypub/issues/290