Extension:Jade/Entity data

Jade data exists on wiki pages, as JSON documented here.

Entity targets
A Jade entity applies to a single wiki entity, given by the Jade entity page's title: "Jade:Diff/543210", which targets a diff with ID 543210 on the wiki.

There are currently two possible target types,


 * Diff - Any edit to a page, for example https://en.wikipedia.org/?diff=12345678
 * Revision - Snapshot of a page's content, for example https://en.wikipedia.org/wiki/Sinharaja_Forest_Reserve?oldid=12345678

Jade Entity page title
Page titles correspond to their target entity like,"en:Special:Diff/12345678 is labeled at en:Jade:Diff/12345678."Each target entity type has its own page title keyword:


 * Jade:Diff/12345678
 * Jade:Revision/12345678

Note that both namespace and keyword may be translated. For example a revision proposal in Russian Wikipedia might have the title "Суждение:Версия/12345678". The Jade API provides a mechanism for providing "entitydata" in an untranslated format. E.g. in Russian Wikipedia, you can reference title=Суждение:Версия/12345678 with entitydata={"type": "revision", "id": 12345678}.

See  in mediawiki-config to translate.

Proposal scoring schema
Schemas and their data formats are documented in JADE/Labels, and we summarize here:


 * damaging - boolean. Is this diff damaging to the content?  false.
 * goodfaith - boolean. Was this diff made in good faith?  true.
 * contentquality - integer. Generally, this refers to a quality scale that looks like the Wikipedia 1.0 assessment in English Wikipedia or the item quality scale in Wikidata.

Namespaces
Jade entity pages are stored on the same wiki as the page being judged, in the  namespace. Permissions for this namespace should be the same as for regular content namespaces. There is also a  namespace for discussion about each Jade page.

Data structure
For more sophisticated integrations, you might want to read and manipulate the Jade entity structure directly. Jade pages are organized by facet, contain a list of proposals for each facet.

Scoring schemas can only be used on a specific entity type, configure  if you need to change the allowed schemas for any entity type. Wikidata for example overrides the default  quality scale with , implementing its own quality scale.

One proposal per facet must be chosen as the  value, this indicates the current consensus opinion.

The minimum valid Jade entity page:

A more interesting example, with conflicting proposals (this is fine), some notes, and both  schemas represented.

Endorsements
Each proposal may have zero or more endorsements. A user may only endorse one proposal within a facet. An endorsement is identified by: entity data, facet, and user data. (Note that label data is implied because a user can only endorse one proposal per facet). Users can add a comment to their endorsement, otherwise it will default to "As Proposer".

Validation
Jade pages are validated before they are saved to the database, and if the data format is incorrect the edit will be aborted. Internally, we specify most of our validation rules as a JSON schema, which you can read here. You can run your own validation locally using the JSON schema libraries available for many programming languages.

Jade entity content must refer to a real revision or page.

An additional validation is done on the page title, which must match the entity being judged as described above.

Detailed validation errors will appear on save, if there are problems with your syntax. Feel free to reach out to us for debugging help.