Page MenuHomePhabricator

Build simple tool for checking Wikidata items against ShEx schema
Open, Needs TriagePublic


The EntitySchema extension, as deployed on, currently links to the shex-simple tool, or “ShEx2 – Simple Online Validator”, where users can check a set of Wikidata entities against the specified schema.

Despite its name, this tool is not simple. It’s grown into a highly powerful tool to check data from diverse sources, against schemas from diverse other sources, with multiple ways to specify the focus nodes, manifest support, multiple user interface styles, drag’n’drop support, and more. This is great for power-users, but overwhelming for Wikidata editors new to the ShEx world; we’ve tried to mitigate this to some extent (T218886 and subtasks), but we’re starting to hit the limits of how much the tool can be adapted for a rather different target audience without inconveniencing its original users.

Instead, we could try to build a separate tool, providing a straightforward path for the common Wikidata workflow: given a schema, provided via URL (Special:EntitySchemaText/ID), and a SPARQL query selecting focus nodes, entered by the user, check those nodes against the schema. One input field, one button, one output area, and that’s it.

The checking would still be done in-browser via the shex.js library, so on the server side this just needs to serve some static files (HTML, CSS, JS).

Event Timeline

I already started this at
However, this is not done yet. The validation part of the core functionality is still missing, as is the UI in any meaningful sense of the word. A (incomplete) list of things that still need to be done:

Core Functionlity ToDo

  • Make validation of items work. Currently there is the following error:
Uncaught (in promise) TypeError: (subgraph || db).getNeighborhood is not a function
    at ShExValidator_constructor._validateShape (ShExValidator.js?02d7:583)

UI Must-Haves

  • create a styling (mobile-first)
    • nice output rendering of entities that passed and failed validation
  • allow import of schema from url (Special:EntitySchemaText)

UI Would-Be Nice

  • allow import of Query from url parameter ( shortlink)
  • Syntax Highlighting with CodeMirror


  • travis setup for tslint and testing
  • deployment to github pages

Depending on the browser I use, I get "Javascript is disabled or slow to load or something went a bit pear-shaped." during the initial load. Could you increase the time-out?

In the interface, the tool asks for ?id as variable. On Wikidata, we generally use "?item" or more recently "?entity". Could you use the same? Wikibase uses "id" in "wikibase:identifiers" and "external-id".

@Esc3300 you’re looking at a different tool than the one described in this task.

For checking exactly one item in a simple way, see also CheckShEx UserScript (based on PyShExy API). is not exactly the tool describe in this task but it's an example of a « simple tool for checking Wikidata »