Skip to content

Self-describing meta-schemas: add @context giving RDF semantics to the keywords (oold-meta -> WoT JSON-Schema-in-RDF; oold-ui -> SHACL 1.2 UI) #82

Open

Description

@simontaurus

Idea

Make the OO-LD meta-schemas themselves OO-LD documents by giving them an @context that assigns RDF semantics to the schema keywords they define. This dogfoods the core thesis ("the artefact is the source") one level up: the vocabulary that describes OO-LD schemas becomes machine-readable about what each keyword means, not just how it is shaped.

Proposal

meta/oold-meta-schema.json - add an @context mapping the JSON Schema keywords to the W3C WoT "JSON Schema in RDF" vocabulary (namespace https://www.w3.org/2019/wot/json-schema#), and the x-oold-* keywords to the OO-LD vocabulary namespace already declared via $vocabulary. WoT provides stable IRIs for JSON Schema constructs: properties, propertyName, enum, const, required, minimum, maximum, exclusiveMinimum/exclusiveMaximum, and the type kinds as classes (ObjectSchema, StringSchema, IntegerSchema, ArraySchema, DataSchema).

meta/oold-ui-meta-schema.json - add an @context mapping the x-oold-ui-* keywords to SHACL 1.2 UI terms:

OO-LD UI keyword SHACL 1.2 UI / SHACL core
x-oold-ui-property-order sh:order
x-oold-ui-property-group sh:group
x-oold-ui-widget (and format) shui:editor / shui:viewer (widget classes e.g. shui:AutoCompleteEditor, shui:EnumSelectEditor, shui:DatePickerEditor, shui:BooleanEditor, shui:TextFieldEditor)
x-oold-ui-form-hidden / x-oold-ui-render-hidden suppress shui:editor / shui:viewer (or a shui:propertyRole)

Why

Caveats

  • The WoT mapping is partial/approximate: JSON Schema type: string corresponds to the WoT StringSchema class rather than a type property, so the @context covers the property-like keywords cleanly and the type kinds need a coercion or are documented as class-valued.
  • SHACL 1.2 UI is a First Public Working Draft (2026); shui: terms may change - pin a dated version and revisit.

Scope

  • Add the two @context blocks; verify each meta-schema still validates as plain JSON Schema 2020-12 and expands as a JSON-LD context.
  • A small test that the meta-schema @context expands without error (jsonld.js).

Related: #76 (SHACL crosswalk / generation), #77 (delivery). Not covered by the closed #6/#41 (which added the meta-schema and $vocabulary, not keyword RDF semantics).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions