ShEx or Shape Expressions is schema based specificitaion for describing and validating RDF graphs.
‘Shape schemas in ShEx look like RDF grammars’
‘Shape Expressions (ShEx) is a language for describing RDF graph structures. A ShEx schema prescribes conditions that RDF data graphs must meet in order to be considered ‘conformant’: which subjects, predicates, and objects may appear in a given graph, in what combinations and with what cardinalities and datatypes.’
Check out the Shex Codegen https://github.com/ludwigschubi/shex-codegen ‘Generate typescript code from shex’ 2022-02-02 11:48
shex.js on GitHub – https://github.com/shexjs/shex.js
ShEx vs SHACL https://www.slideshare.net/jelabra/shex-vs-shacl