w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
278 stars 62 forks source link

width, height in Image #467

Closed evanp closed 6 years ago

evanp commented 6 years ago

Example 80 has Image objects with width and height properties. I don't think these are actually allowed in Image.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "summary": "A simple note",
  "type": "Note",
  "content": "A simple note",
  "icon": [
    {
      "type": "Image",
      "summary": "Note (16x16)",
      "url": "http://example.org/note1.png",
      "width": 16,
      "height": 16
    },
    {
      "type": "Image",
      "summary": "Note (32x32)",
      "url": "http://example.org/note2.png",
      "width": 32,
      "height": 32
    }
  ]
}
jasnell commented 6 years ago

oh wow, that's an oversight. Pretty certain a previous draft allowed for it. The domain for both width and height should include Link and Image.

evanp commented 6 years ago

OK, we should probably put that in the ERRATA then.

jasnell commented 6 years ago

Should double check the owl schema also, make sure it's covered in there.

evanp commented 6 years ago

Example 51 shows an Image with an url property that's a Link, which can have a width and height.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Image",
  "name": "Cat Jumping on Wagon",
  "url": [
    {
      "type": "Link",
      "href": "http://example.org/image.jpeg",
      "mediaType": "image/jpeg"
    },
    {
      "type": "Link",
      "href": "http://example.org/image.png",
      "mediaType": "image/png"
    }
  ]
}