Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-LD keywords integrated with LinkML schema #27

Open
mahdanoura opened this issue Jul 17, 2024 · 2 comments
Open

JSON-LD keywords integrated with LinkML schema #27

mahdanoura opened this issue Jul 17, 2024 · 2 comments

Comments

@mahdanoura
Copy link
Contributor

mahdanoura commented Jul 17, 2024

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
Copy link
Contributor Author

mahdanoura commented Jul 17, 2024

@lu-zero has created an issue to the LinkML community regarding escaping these terms correctly linkml/linkml#2110

@TallTed
Copy link
Member

TallTed commented Jul 17, 2024

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants