solid / vocab

Solid Vocabularies
https://solid.github.io/vocab/
42 stars 14 forks source link

Add Solid Notifications vocabulary and JSON-LD context #85

Closed csarven closed 1 year ago

csarven commented 1 year ago

This PR follows https://github.com/solid/vocab/pull/62 and accompanied with https://github.com/solid/specification/pull/491 .

This defines a JSON-LD @context for use with the Solid Notifications Protocol, Version 0.2.0 (see also ED).

The notification specification describes this resource as being available at https://www.w3.org/ns/solid/notification/v1.

In addition, this defines an RDF vocabulary for the terms used in the Solid Notifications Protocol, Version 0.2.0 (see also ED). A Turtle serialization (possibly in addition to other concrete RDF syntaxes) is intended to be available from http://www.w3.org/ns/solid/notifications.

joachimvh commented 1 year ago

This context seems to not give the correct/expected result for the channelType field.

Taking the following example

{
  "@context": [
    "https://www.w3.org/ns/solid/notification/v1"
  ],
  "id": "https://websocket.example/subscription",
  "channelType": "WebSocketChannel2023",
  "feature": [ "rate" ]
}

When putting this in the JSON-LD playground, and replacing the context URL with the actual context defined here, only the feature triple is generated while the channelType field is ignored. The reason being that channelType is defined as "@type": "@vocab", but WebSocketChannel2023 is not a term that is known in the context and no default @vocab value is defined (but I'm not sure doing that would be a good idea).

csarven commented 1 year ago

Merging as per consensus in 2023-03-08 meeting: https://github.com/solid/specification/blob/main/meetings/2023-03-08.md#add-tr2022notifications-protocol-20221231 in which accompanied with https://github.com/solid/specification/pull/491