Description
I updated the CSS to be in line with the editor's draft of the notifications spec, and similarly to #114 here are some considerations I had going through the spec. These are mostly more minor than the the previous issue though and perhaps a bit nitpicky. I also did not go through all the active issues so potentially I mention some things that are already discussed there. Also same disclaimer that I can create separate issues if necessary.
What is a data model?
Most of the issues I had are related to the concept of "data model". The data models, as they are described in the spec, do they represent an abstract "object" with the properties specified, or do they specifically mean the JSON-LD objects representing that data? So is a description resource "an object with an id
property", or the JSON-LD serialization of that object with the notification context, and thus always having that specific JSON-LD format. In the first case other JSON-LD serialization of the same information, such as using @id
instead or using http://www.w3.org/ns/solid/notifications#subscription
as key in the JSON instead of subscription
, would also be valid while in the second they wouldn't.
The reason to ask is to know what specific formats the server should support both for input as output. E.g., should we convert a subscription request to triples and interpret it like, or should we explicitly only support the JSON-LD framing as it is shown in the examples. Currently we do the latter, but I was thinking about potentially supporting the former.
Profile parameter
This is probably related to the previous point as I saw some discussions about using the profile
parameter to indicate compacting or some form of framing. But as it currently is written in the spec this parameter has no use right? How I read the definition of profile is that only the behaviour of the values found there are defined, and other custom values should be defined in the corresponding spec. The notification spec only mentions the following:
Subscription Servers MUST respond with a 415 status code for HTTP requests with unsupported values in the profile parameter.
So is that currently the only thing a server has to do? Make sure that the profile
parameter has the correct value if it is present, but not interpret it in any other way? I understand that this will probably be expanded upon in future versions.
receiveFrom
One receiveFrom property to identify the resource on the Notification Sender that can be used to establish a connection to receive notifications.
Just curious why this is not 0-1. I'm thinking of, for example, webhooks where this might not be relevant?
What to do with fields not supported by the context
As mentioned in solid/vocab#85 (comment) I still had some issues with the current version of the context. So with the goal of making sure the data we output is still valid RDF, we output the following when doing a GET on the webhook subscription:
{
"@context": [
"https://www.w3.org/ns/solid/notification/v1"
],
"id": "http://localhost:3000/.notifications/WebSocketChannel2023/",
"channelType": "http://www.w3.org/ns/solid/notifications#WebSocketChannel2023",
"feature": [
"accept",
"endAt",
"rate",
"startAt",
"state"
]
}
Was wondering if this is an OK solution (for now), or if we should perhaps introduce a second context to make sure the channelType
can be shortened as expected.