JADE/Integration

This page describes what data can be included in a JADE judgment or endorsement.

JADE namespace
All judgments will be stored in a new namespace on the same wiki as the page being judged. Permissions for this namespace should be the same as for regular content namespaces. There is a "JADE_talk" namespace for discussion about each JADE page.

Wiki entity being judged
We currently support judgments about three types of wiki entities.


 * 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/w/index.php?title=Sinharaja_Forest_Reserve&oldid=12345678
 * Page - Attributes of a page which won't change as the page evolves. For example, categories or WikiProjects it might be associated with, or whether the subject is notable.

Page title
The title is must strictly correspond to the entity being judged. For example, judgments about edit https://en.wikipedia.org/?diff=12345678 must appear at https://en.wikipedia.org/wiki/JADE:Diff/12345678. Each type of wiki entity has its own page title structure:


 * JADE:Diff/12345678
 * JADE:Revision/12345678
 * JADE:Page/582115

Data structure
A minimal example: {   "entity": { "type": "diff", "rev_id": 376901 },   "schemas": { "damaging": [ {                "data": true },       ],    } }

More optional fields present: {   "entity": { "type": "diff", "rev_id": 376901 },   "schemas": { "damaging": [ {               "data": true, "endorsements": [ {                       "username": "Adamw", "guid": 513988, "comment": "Cos, subjective", "origin": "Huggle 3.4.3" },                   {                    	"username": "AWight (WMF)", "guid": 123123 }               ],                "preferred": true },           {                "data": false }       ],        "goodfaith": [ {               "data": false }       ]    } }

Revision judgment: {   "entity": { "type": "revision", "rev_id": 376901 },   "schemas": { "wp10": [ {               "data": "C" }       ]    } }

Page judgment: {   "entity": { "type": "page", "page_id": 188553 },   "schemas": { "drafttopic": [ {               "data": [ "Medicine", "Biography" ]           }        ]    } }

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, here. You can run your own validation locally using the JSON schema libraries available for many programming languages.

Judgment content must

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