Repository navigation
Bidirectional OO-LD <-> SHACL converter #108
Copy link
Copy link
Open
Labels
converterSchema conversion to/from another schema or modelling languageSchema conversion to/from another schema or modelling language
Description
Convert between OO-LD schemas and SHACL shapes graphs in both directions, so schemas authored in either form can be used with the other stack.
Spec-side twin: OO-LD/oold-schema#76 (align x-oold-range / x-oold-ui-* with SHACL 1.2). That issue holds the crosswalk definition; this one is the implementation.
cc @durmaz07
OO-LD to SHACL
sh:NodeShapeper object schema,sh:PropertyShapeper propertytypetosh:datatype/sh:nodeKind,requiredand array bounds tosh:minCount/sh:maxCount,patterntosh:pattern,enumtosh:in, numeric bounds tosh:minInclusive/sh:maxInclusive- JSON-LD context resolves property IRIs for
sh:pathand the type IRI forsh:targetClass - Logical composition maps to SHACL Core:
anyOftosh:or,oneOftosh:xone,allOftosh:and,nottosh:not - Nested objects and
$ref
SHACL to OO-LD
Shapes graph to JSON Schema plus @context, inverting the mappings above. Several constructs have
no direct counterpart but do have candidates to evaluate:
sh:closedtoadditionalProperties: false- inverse paths to
x-oold-reverse-properties sh:pathsequence and alternative paths: no evident equivalent, needs a decision
Round-trip OO-LD to SHACL to OO-LD should be semantically stable on the reference schemas.
Open questions
if/then/elsehas no SHACL Core equivalent. SHACL-SPARQL (sh:sparql) could express it, as could SHACL 1.2 Node Expressions. Worth deciding whether to support it at all: conditional subschemas are also awkward for code generation, so the spec may prefer to discourageif/thenrather than carry it through every converter. Coordinate with Align x-oold-range / x-oold-ui-* with SHACL 1.2 (Core, Node Expressions, User Interfaces) oold-schema#76.- Which SHACL subset is the primary target: Core only, or Core plus SHACL-SPARQL for the residue
- SHACL 1.2 User Interfaces is a Working Draft and overlaps
x-oold-ui-*; the converter should emit and consume UI annotations rather than dropping them - Whether SHACL validation results should be normalised against JSON Schema validator output
Acceptance
- Generated shapes validate reference instances consistently with JSON Schema validation
- Round-trip test in both directions over the example schemas in the repo
- Crosswalk implemented consistently with the table defined in Align x-oold-range / x-oold-ui-* with SHACL 1.2 (Core, Node Expressions, User Interfaces) oold-schema#76
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
converterSchema conversion to/from another schema or modelling languageSchema conversion to/from another schema or modelling language
Activity
SimonStier commentedon Aug 13, 2026
cc @POTUSAITEJA @Kirankumaraswamy, who will contribute to the SHACL converter here (and to the k-types and SAMM converters once those issues exist). Org invitations are pending, so they are not assignable yet.
Kirankumaraswamy commentedon Aug 13, 2026
@SimonStier , I can work on OO-LD <-> SHACL and then to ktypes. Sai will work on SAMM as he has experience with it.
durmaz07 commentedon Aug 13, 2026
Hi everyone, also OO-LD <-> AAS conversion is mentioned in the proposal and, in IWM-internal discussions, we so far assigned it to @Kirankumaraswamy as well due to prior experience with AAS in PMD-X-MAPRO.
SimonStier commentedon Aug 19, 2026