activitystreams
activitystreams copied to clipboard
Example 102: `url` property missing `type: "Link"`
Please Indicate One:
- [ ] Editorial
- [ ] Question
- [X] Feedback
- [ ] Blocking Issue
- [X] Non-Blocking Issue
Please Describe the Issue:
In https://www.w3.org/TR/activitystreams-vocabulary, Example 102 is:
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Video",
"name": "Cool New Movie",
"duration": "PT2H30M",
"preview": {
"type": "Video",
"name": "Trailer",
"duration": "PT1M",
"url": {
"href": "http://example.org/trailer.mkv",
"mediaType": "video/mkv"
}
}
}
The url property of preview is missing its "type": "Link" property of the object to be a valid ActivityStream object.
Note that according to the core ActivityStream spec: https://www.w3.org/TR/activitystreams-core/#link
That the type property for the Link type is omitted as whether being required or optional:
The target URI of the Link is expressed using the required href property. In addition, all Link instances share the following common set of optional properties as normatively defined by the Activity Vocabulary: id | name | hreflang | mediaType | rel | height | width
Note that for the Object type, which is explicitly disjoint from Link in the ActivityStream vocabulary, it does mention type as being optional:
All properties are optional (including the id and type).
Therefore, according to an implementation I am working on, Example 102 would not be within spec.
We discussed during issue triage whether this is actually an error. We think it's on the fence, but the point of the example is not to show Link values without a type property, so it's definitely clearer with the type. I've added an erratum with the corrected values. Once it's approved by the CG, we can add it to the editor's draft.