solid/solid-oidc

Confusing behavior of compaction with mandated context

woutermont opened this issue · 0 comments

While tryint to combine Solid-OIDC config with SAI app identity statements in the JSON-LD Playground, I stumbled upon the following practical annoyance, which I could only circumvent by diverting from the mandated JSON-LD context.

Starting from the example Client ID Document in 5.1, I expanded it with the context, and added some other statements, e.g. "http://foo": [{ "@id": "http:/bar" }]. However, when compacting the result again, such a statement becomes the "http://foo": [{ "client_id": "http:/bar" }]. While semantically correct (see below), this is of course extremely confusing to work with. It is due to the following part of the context:

"client_id": {
    "@id": "@id",
    "@type": "@id"
}

This creates an allias for @id, and was probably meant to remove the need of "redundantly" adding the Client Identifier twice (once as @id and once as client_id). While I am partial to the semantic elegance of this construct, the resulting behavior makes it all quite confusing. I would be in favor of changing that line of the context to "@id": "oidc:client_id".