oeg-upm / wot-hive

The WoT Hive an implementation of a WoT Directory described in the W3C WoT Discovery standard
Apache License 2.0
13 stars 7 forks source link

Error in content type #14

Closed Serge3006 closed 2 years ago

Serge3006 commented 2 years ago

When we create a thing description with the type field in the property section we have an error reporting that the type is a URL because of the slash.

AndreaCimminoArriaga commented 2 years ago

Please could you provide the TD?

Salva5297 commented 2 years ago

Below is an example of a TD where this error occurs. Specifically, it occurs in the lines of:

The TD is the following:

{
  "@context": [
    "https://www.w3.org/2019/wot/td/v1", 
    {
      "beo": "https://pi.pauwel.be/voc/buildingelement#", 
      "bot": "https://w3id.org/bot#", 
      "brick": "https://brickschema.org/schema/1.1/Brick#", 
      "om": "http://openmetrics.eu/openmetrics#", 
      "props": "https://w3id.org/props#", 
      "rdfs": "http://www.w3.org/2000/01/rdf-schema#", 
      "xsd": "http://www.w3.org/2001/XMLSchema#"
    }
  ], 
  "@id": "data.cogito.iot.linkeddata.es/thing/cogito1212", 
  "@type": [
    "bot:Building", 
    "brick:Building"
  ], 
  "description": "A building element.", 
  "properties": {
    "IfcFile": {
      "forms": [
        {
          "href": "https://example_uri.com/files/cogito1212",
          "type": "multipart-form/data"
        }
      ]
    }, 
    "RDFUri": {
      "forms": [
        {
          "href": "https://openmetrics.eu/openmetrics#Building_120",
          "type": "text/turle"
        }
      ]
    }
  }, 
  "security": [
    "no_sec"
  ], 
  "securityDefinitions": {
    "no_sec": {
      "scheme": "nosec"
    }
  }, 
  "title": "cogito1212"
}
AndreaCimminoArriaga commented 2 years ago

As commented in the issue #13 the id of the TD is not correct. Once the id of the TD is correct the registration occurs as expected.