Wikipedia:Ultraviolet/configuration.schema.json

{   "$schema": "http://json-schema.org/draft-07/schema#", "allOf": [ {           "$ref": "#/definitions/default_1" },       {            "properties": { "revertOptions": { "$ref": "#/definitions/Record\u003Cstring,SerializableRevertOption\u003E" },               "warnings": { "properties": { "categories": { "$ref": "#/definitions/SerializedWarningCategories" },                       "vandalismWarning": { "type": "string" },                       "warnings": { "$ref": "#/definitions/Record\u003Cstring,SerializedWarning\u003E" }                   },                    "type": "object" }           },            "type": "object" }   ],    "definitions": { "IncludesWarningLevelSignature": { "description": "A warning level signature that searches a page for a specific string of wikitext.", "properties": { "substring": { "description": "The wikitext to look for.", "type": "string" },               "type": { "description": "The type determines whether or not this signature is includes-based or regular expression-based.", "enum": [ "includes" ],                   "type": "string" }           },            "type": "object" },       "PageProtectionRequestTarget": { "description": "A page or section where page protection requests will be added.", "properties": { "extraLines": { "default": 0, "description": "The amount of new lines to add before/after each request when appending/prepending, respectively.", "enum": [ 0                   ],                    "type": "number" },               "method": { "default": "prepend", "description": "Whether or not the content will be appended or prepended to the target page/section.", "enum": [ "append", "prepend" ],                   "type": "string" },               "page": { "description": "The target page to add to.", "type": "string" },               "section": { "anyOf": [ {                           "enum": [ "new" ],                           "type": "string" },                       {                            "type": "number" }                   ],                    "description": "The target section ID to add to. If each request adds a new level 2 heading, this value should be set to \"new\"." },               "template": { "description": "The wikitext to add to the target page/section.", "type": "string" }           },            "type": "object" },       "PolicyViolationWarning": { "properties": { "additionalText": { "anyOf": [ {                           "properties": { "label": { "type": "string" },                               "visibility": { "$ref": "#/definitions/WarningFieldVisibility" }                           },                            "type": "object" },                       {                            "enum": [ "disabled", "optional", "required" ],                           "type": "string" }                   ]                },                "category": { "$ref": "#/definitions/WarningCategory" },               "keywords": { "items": { "type": "string" },                   "type": "array" },               "name": { "type": "string" },               "note": { "type": "string" },               "relatedPage": { "anyOf": [ {                           "properties": { "label": { "type": "string" },                               "visibility": { "$ref": "#/definitions/WarningFieldVisibility" }                           },                            "type": "object" },                       {                            "enum": [ "disabled", "optional", "required" ],                           "type": "string" }                   ]                },                "template": { "type": "string" },               "type": { "$ref": "#/definitions/WarningType.PolicyViolation" }           },            "type": "object" },       "ProtectionLevel": { "description": "A protection level provided by the wiki, used in protection level detection and page protection requests.", "properties": { "id": { "description": "The restriction group of this protection level, as defined by the MediaWiki wiki configuration. If this level pertains to the pseudo-level given by FlaggedRevs, this value should be set to `_flaggedrevs`.", "type": "string" },               "name": { "description": "The name of this protection level.", "type": "string" },               "requestable": { "default": true, "description": "Whether or not this can be used as a target protection level when requesting page protection.", "type": "boolean" },               "statusName": { "description": "A string denoting the status of a page under this protection level.", "type": "string" }           },            "type": "object" },       "Record\u003C\"increase\"|\"decrease\",PageProtectionRequestTarget\u003E": { "properties": { "decrease": { "$ref": "#/definitions/PageProtectionRequestTarget" },               "increase": { "$ref": "#/definitions/PageProtectionRequestTarget" }           },            "type": "object" },       "Record\u003CWarningLevel.Notice|WarningLevel.Caution|WarningLevel.Warning|WarningLevel.Final|WarningLevel.Immediate,WarningLevelSignature[]\u003E": { "properties": { "1": {                   "items": { "anyOf": [ {                               "$ref": "#/definitions/IncludesWarningLevelSignature" },                           {                                "$ref": "#/definitions/RegexWarningLevelSignature" }                       ]                    },                    "type": "array" },               "2": {                    "items": { "anyOf": [ {                               "$ref": "#/definitions/IncludesWarningLevelSignature" },                           {                                "$ref": "#/definitions/RegexWarningLevelSignature" }                       ]                    },                    "type": "array" },               "3": {                    "items": { "anyOf": [ {                               "$ref": "#/definitions/IncludesWarningLevelSignature" },                           {                                "$ref": "#/definitions/RegexWarningLevelSignature" }                       ]                    },                    "type": "array" },               "4": {                    "items": { "anyOf": [ {                               "$ref": "#/definitions/IncludesWarningLevelSignature" },                           {                                "$ref": "#/definitions/RegexWarningLevelSignature" }                       ]                    },                    "type": "array" },               "5": {                    "items": { "anyOf": [ {                               "$ref": "#/definitions/IncludesWarningLevelSignature" },                           {                                "$ref": "#/definitions/RegexWarningLevelSignature" }                       ]                    },                    "type": "array" }           },            "type": "object" },       "Record\u003Cstring,RevertOption\u003E": { "type": "object" },       "Record\u003Cstring,SerializableRevertOption\u003E": { "type": "object" },       "Record\u003Cstring,SerializedWarning\u003E": { "type": "object" },       "Record\u003Cstring,Warning\u003E": { "type": "object" },       "RegexWarningLevelSignature": { "properties": { "flags": { "description": "The regular expression flags. This is equal to the flags provided by JavaScript. You are not required to add a \"g\" flag, since RedWarn will locate only one instance of that signature.", "type": "string" },               "source": { "description": "The regular expression source. If you were writing a JavaScript RegExp literal, this would be what goes in between the slashes.", "type": "string" },               "type": { "description": "The type determines whether or not this signature is includes-based or regular expression-based.", "enum": [ "regex" ],                   "type": "string" }           },            "type": "object" },       "SerializedWarningCategories": { "type": "object" },       "SingleIssueWarning": { "properties": { "additionalText": { "anyOf": [ {                           "properties": { "label": { "type": "string" },                               "visibility": { "$ref": "#/definitions/WarningFieldVisibility" }                           },                            "type": "object" },                       {                            "enum": [ "disabled", "optional", "required" ],                           "type": "string" }                   ]                },                "category": { "$ref": "#/definitions/WarningCategory" },               "keywords": { "items": { "type": "string" },                   "type": "array" },               "name": { "type": "string" },               "note": { "type": "string" },               "relatedPage": { "anyOf": [ {                           "properties": { "label": { "type": "string" },                               "visibility": { "$ref": "#/definitions/WarningFieldVisibility" }                           },                            "type": "object" },                       {                            "enum": [ "disabled", "optional", "required" ],                           "type": "string" }                   ]                },                "template": { "type": "string" },               "type": { "$ref": "#/definitions/WarningType.SingleIssue" }           },            "type": "object" },       "TieredWarning": { "properties": { "additionalText": { "anyOf": [ {                           "properties": { "label": { "type": "string" },                               "visibility": { "$ref": "#/definitions/WarningFieldVisibility" }                           },                            "type": "object" },                       {                            "enum": [ "disabled", "optional", "required" ],                           "type": "string" }                   ]                },                "category": { "$ref": "#/definitions/WarningCategory" },               "keywords": { "items": { "type": "string" },                   "type": "array" },               "levels": { "items": { "$ref": "#/definitions/WarningLevel" },                   "type": "array" },               "name": { "type": "string" },               "note": { "type": "string" },               "relatedPage": { "anyOf": [ {                           "properties": { "label": { "type": "string" },                               "visibility": { "$ref": "#/definitions/WarningFieldVisibility" }                           },                            "type": "object" },                       {                            "enum": [ "disabled", "optional", "required" ],                           "type": "string" }                   ]                },                "template": { "type": "string" },               "type": { "$ref": "#/definitions/WarningType.Tiered" }           },            "type": "object" },       "WarningCategory": { "properties": { "id": { "description": "The ID of this warning category.", "type": "string" },               "label": { "description": "The label of this warning category.", "type": "string" }           },            "type": "object" },       "WarningFieldVisibility": { "enum": [ "disabled", "optional", "required" ],           "type": "string" },       "WarningLevel": { "description": "The Warning Level is derived from the English Wikipedia's four-level tier system for issuing user warnings.", "enum": [ 0,               1,                2,                3,                4,                5            ],            "type": "number" },       "WarningType.PolicyViolation": { "enum": [ 2           ],            "type": "number" },       "WarningType.SingleIssue": { "enum": [ 1           ],            "type": "number" },       "WarningType.Tiered": { "enum": [ 0           ],            "type": "number" },       "default_1": { "description": "This is a configuration file used by RedWarn to provide wiki-specific features and details. Each per-wiki configuration should be stored in `Project:RedWarn/configuration.json` of that wiki, otherwise it will fall back to a generic configuration which does not enable most features of RedWarn.\n\nThis schema uses the English Wikipedia configuration as an example.", "properties": { "configVersion": { "description": "The config version specifies the current version of this configuration file. RedWarn will try to upgrade outdated configuration files based on this number.", "type": "number" },               "meta": { "description": "Metadata regarding connections to RedWarn on this wiki. This can be omitted if all values are default.", "properties": { "link": { "description": "The link to the local RedWarn documentation page. This is used in all edit summaries. If this is being used in a Wikimedia Foundation wiki, this value is usually set to `RedWarn`. This may differ for other wikis, such as Fandom wikis, which might use `RedWarn` instead. If your wiki has a local page for this, you can set this to `Project:RedWarn` or a similar page.", "type": "string" },                       "tag": { "description": "The RedWarn tag. This must be a valid page tag name in Special:Tags. Setting this to an improper value will make all RedWarn edits fail to save.", "type": "string" }                   },                    "type": "object" },               "protection": { "description": "Protection options facilitates page protection requests for wikis which allow page protection requests. This also enables support for wikis which have FlaggedRevs, such as some Wikimedia Foundation wikis. If not supplied, page protection requests will be disabled.", "properties": { "flaggedrevs": { "default": false, "description": "Whether or not this wiki is using the FlaggedRevs extension. If set to true, a special level in `levels` must be supplied with the ID `_flaggedrevs`.", "type": "boolean" },                       "levels": { "description": "Levels of protection available on this wiki. If this is not supplied, protection level detection will be disabled and no option will be provided to target specific protection levels when requesting page protection.", "items": { "$ref": "#/definitions/ProtectionLevel" },                           "type": "array" },                       "reasons": { "description": "Built-in reasons for page protection.", "items": { "type": "string" },                           "type": "array" },                       "requests": { "$ref": "#/definitions/Record\u003C\"increase\"|\"decrease\",PageProtectionRequestTarget\u003E", "description": "Target pages for page protection requests." }                   },                    "type": "object" },               "revertOptions": { "anyOf": [ {                           "$ref": "#/definitions/Record\u003Cstring,SerializableRevertOption\u003E" },                       {                            "$ref": "#/definitions/Record\u003Cstring,RevertOption\u003E" }                   ],                    "description": "Revert options determine the options show to a user when viewing a diff page. If not supplied, this will only show built-in options (which include normal rollback and good-faith reverts)." },               "warnings": { "description": "Configures every available user warning on this wiki. This requires working user warning templates, along with special metadata to classify warnings properly.", "properties": { "categories": { "anyOf": [ {                                   "$ref": "#/definitions/SerializedWarningCategories" },                               {                                    "items": { "$ref": "#/definitions/WarningCategory" },                                   "type": "array" }                           ],                            "description": "The available warning categories for this wiki. This aids in categorizing user warnings in the `warnings` array. This is an array of warning category IDs (as used in the array) with their respective labels." },                       "ipAdvice": { "description": "A template used to inform anonymous editors that the warning received may not be for them. This is appended on a new line after the actual warning template.", "type": "string" },                       "signatures": { "$ref": "#/definitions/Record\u003CWarningLevel.Notice|WarningLevel.Caution|WarningLevel.Warning|WarningLevel.Final|WarningLevel.Immediate,WarningLevelSignature[]\u003E", "description": "Warning signatures are indicators that a talk page has a warning on it. If a talk page has a warning under the current month that matches a signature, the warning level will be raised to the highest level triggered." },                       "vandalismWarning": { "anyOf": [ {                                   "$ref": "#/definitions/TieredWarning" },                               {                                    "$ref": "#/definitions/SingleIssueWarning" },                               {                                    "$ref": "#/definitions/PolicyViolationWarning" },                               {                                    "type": "string" }                           ],                            "description": "The warning template for vandalism edits. This is used by reverts done on a user's contributions page. If unavailable, contributions rollbacks will instead bear a summary of \"Possible vandalism\" in the user's set language. This value refers to the ID of a warning found in the `warnings` array." },                       "warnings": { "anyOf": [ {                                   "$ref": "#/definitions/Record\u003Cstring,SerializedWarning\u003E" },                               {                                    "$ref": "#/definitions/Record\u003Cstring,Warning\u003E" }                           ],                            "description": "A full list of user warnings available on this wiki. This is required to enable user warnings. Each warning contains data about the warning, its template name, and a user-friendly name, along with additional tags for searching." }                   },                    "type": "object" },               "wiki": { "description": "The wiki ID for this wiki. This is used to determine whether or not this configuration does not belong to the wiki where RedWarn is running. This should be equal to the `wgWikiID` MediaWiki configuration constant.", "type": "string" }           },            "type": "object" }   } }