Wot-thing-description: Inconsistency on accepted values for @context

Created on 6 May 2019  路  8Comments  路  Source: w3c/wot-thing-description

In the spec, there are multiple values for the @context. Below are the different ones:

  • 5.3.1.1 Thing, below the table; Example 5: The mandatory context definition of the string "https://www.w3.org/2019/wot/td/v1" MUST be the first item in the @context array. ( I think that this is a bug, there shouldn't be a wot)
  • Example 1 and 2 and pretty much everywhere: "@context": "https://www.w3.org/2019/td/v1" ( I think this is the correct one)
  • Validation schema:
                {
                    "type": "string",
                    "pattern": "^https?://(www\\.)?w3\\.org/2019/td/v1$"
                }

( This is a flexible version of the second one)

  • In the comments of PR #603 @mkovatsc said that we have only the value with www which contradicts the previous point.

In the end, I think it should be clear if @context can be flexible/redirectable or not. Some questions I have:

  • http or https
  • www or not
  • with year or not: 3.2 Alternative Namespaces says that the namespace will redirect but is it OK to have a TD without the year that redirects to the latest version upon JSON-LD processing.

Most helpful comment

In that case if there are no objections, I am constraining the schema to accept only https://www.w3.org/2019/td/v1

All 8 comments

In the comments of PR #603 @mkovatsc said that we have only the value with www which contradicts the previous point.

It rather says the JSON Schema needs to be made more restrictive

  • the URI is used as an identifier of the format version, hence no flexibility
  • with www
  • with year (Alternative Namespaces are for the Vocabularies, not the context file)
  • http vs https is still open for the Namespace IRIs, as we saw both practices (SSN with http, verifiable credentials with https)
  • for the context file, it should probably be https -- other comments?

Regarding https vs http and www & without www I just tested the existing w3.org/ns/td with postman and all variations returned the same document:

These are practical aspects of retrieving something from the Web server. We need firstly the unique identifier aspect.

We need firstly the unique identifier aspect.

I agree with this, whether they return the same document can depend on the configuration of the Web server/DNS

I would simple go for https://www.w3.org/2019/td/v1 as announced in the TD spec and define this in the JSON Schema.

I fixed the namespaces errors (https://www.w3.org/2019/wot/td/v1 --> https://www.w3.org/2019/td/v1) in the spec

In that case if there are no objections, I am constraining the schema to accept only https://www.w3.org/2019/td/v1

If the PR#632 is merged this issue can be closed given that @sebastiankb has also fixed the inconsistency with having wot in the uri or not

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmcanterafonseca picture jmcanterafonseca  路  8Comments

msporny picture msporny  路  8Comments

cgerhard picture cgerhard  路  7Comments

takuki picture takuki  路  5Comments

mkovatsc picture mkovatsc  路  9Comments