w3c / wot-thing-description-toolchain-tmp

work area for WoT Thing Description toolchain
0 stars 1 forks source link

JSON-LD keywords integrated with LinkML schema #27

Open mahdanoura opened 1 month ago

mahdanoura commented 1 month ago

json-ld compaction terms like @context, @type inlcuded in the LinkML causes an issue for shacl / rdf generation, as these terms are not required. This is also not recommended according to the LinkML community: https://linkml.io/linkml/howtos/using-jsonld.html

slots:
  "@type":
    description: >-
      JSON-LD keyword to label the object with semantic tags (or types).
    exactly_one_of:
      - range: string
      - range: string
        multivalued: true
    inlined: false
  Thing:
    tree_root: true
    description: >-
      An abstraction of a physical or a virtual entity whose metadata and interfaces are described by a WoT Thing
      Description, whereas a virtual entity is the composition of one or more Things.
    class_uri: td:Thing
    attributes:
      "@context":
        description: >- 
          JSON-LD keyword to define short-hand names called terms that are used throughout a TD document.
        required: true
        range: uriorcurie
        array:
    slots:
      - "@type"
mahdanoura commented 1 month ago

@lu-zero has created an issue to the LinkML community regarding escaping these terms correctly https://github.com/linkml/linkml/issues/2110

TallTed commented 1 month ago

Please take care to always code fence @ entities in GitHub comments, titles, etc. As this issue stands, you're drafting GitHub users @context and @type, without their request nor permission. All you need to do is wrap those entity identifiers in single backticks, `, like `@context` and `@type`. (It's as important to edit existing comments as it is to adopt this practice going forward.)