activitystreams icon indicating copy to clipboard operation
activitystreams copied to clipboard

`formerType` should be `@type: @vocab` in context document

Open trwnh opened this issue 8 months ago • 1 comments

    "formerType": {
      "@id": "as:formerType",
      "@type": "@id"
    },

Problem

"@type": "@id" is base-relative, not vocab-relative; therefore, terms such as the AS2 activity types will not expand. For example, "formerType": "Note" should expand according to the definition of Note, which is https://www.w3.org/ns/activitystreams#Note, but this definition does nothing unless the term formerType is vocab-relative.

Solution

Make formerType vocab-relative by defining it as "@type": "@vocab".

    "formerType": {
      "@id": "as:formerType",
      "@type": "@vocab"
    },

trwnh avatar Mar 15 '25 02:03 trwnh

This makes sense to me. It probably makes sense to just patch the context and push a new version, since this appears to be a straight-up bug. It would be backwards-compatible for most uses, except for extremely unusual ones.

evanp avatar Mar 21 '25 16:03 evanp