diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index ba221bc5a5f..de4bb92d48f 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -40,7 +40,6 @@ "cloud-sdk-pipeline-config-schema.json", "cloudify.json", "codeclimate.json", - "codecov.json", "codeship-services.json", "codeship-steps.json", "coffeelint.json", @@ -156,7 +155,6 @@ "label-commenter-config.json", "launchsettings.json", "lerna.json", - "lgtm.json", "libman.json", "lintstagedrc.schema.json", "mdxlintrc.json", diff --git a/src/schemas/json/codecov.json b/src/schemas/json/codecov.json index 98decea4441..534b61ac467 100644 --- a/src/schemas/json/codecov.json +++ b/src/schemas/json/codecov.json @@ -4,10 +4,18 @@ "definitions": { "default": { "$comment": "See https://docs.codecov.com/docs/commit-status#basic-configuration", + "type": "object", "properties": { "target": { - "type": ["string", "number"], - "pattern": "^(([0-9]+\\.?[0-9]*|\\.[0-9]+)%?|auto)$", + "anyOf": [ + { + "type": "string", + "pattern": "^(([0-9]+\\.?[0-9]*|\\.[0-9]+)%?|auto)$" + }, + { + "type": "number" + } + ], "default": "auto" }, "threshold": { @@ -25,7 +33,14 @@ "default": [] }, "paths": { - "type": ["array", "string"], + "anyOf": [ + { + "type": "array" + }, + { + "type": "string" + } + ], "default": [] }, "branches": { @@ -77,10 +92,17 @@ } }, "assume": { - "type": ["boolean", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } } }, @@ -169,7 +191,17 @@ "type": "string" }, "max_report_age": { - "type": ["string", "integer", "boolean"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] }, "disable_default_path_fixes": { "type": "boolean" @@ -209,16 +241,30 @@ "type": "object", "properties": { "hide_density": { - "type": ["boolean", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "hide_complexity": { - "type": ["boolean", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "hide_contextual": { "type": "boolean" @@ -481,44 +527,73 @@ }, "status": { "description": "Commit status. See https://docs.codecov.io/docs/commit-status for details.", - "type": ["boolean", "object"], - "additionalProperties": false, - "properties": { - "default_rules": { - "type": "object" + "anyOf": [ + { + "type": "boolean" }, - "project": { + { + "type": "object", + "additionalProperties": false, "properties": { - "default": { - "$ref": "#/definitions/default", - "type": ["object", "boolean"] - } - }, - "additionalProperties": { - "$ref": "#/definitions/default", - "type": ["object", "boolean"] - } - }, - "patch": { - "anyOf": [ - { - "$ref": "#/definitions/default", + "default_rules": { "type": "object" }, - { - "type": "string", - "enum": ["off"] + "project": { + "type": "object", + "properties": { + "default": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/default", + "type": "object" + } + ] + } + }, + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/default", + "type": "object" + } + ] + } }, - { - "type": "boolean" + "patch": { + "anyOf": [ + { + "$ref": "#/definitions/default", + "type": "object" + }, + { + "type": "string", + "enum": ["off"] + }, + { + "type": "boolean" + } + ] + }, + "changes": { + "$ref": "#/definitions/default", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object" + } + ] } - ] - }, - "changes": { - "$ref": "#/definitions/default", - "type": ["object", "boolean"] + } } - } + ] } } }, @@ -610,8 +685,13 @@ } } }, - { "type": "boolean" }, - { "type": "string", "enum": ["off"] } + { + "type": "boolean" + }, + { + "type": "string", + "const": "off" + } ] } }, diff --git a/src/schemas/json/csslintrc.json b/src/schemas/json/csslintrc.json index 2a321b881a0..cf383bcce0d 100644 --- a/src/schemas/json/csslintrc.json +++ b/src/schemas/json/csslintrc.json @@ -1,12 +1,12 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/csslintrc.json", "definitions": { "rule": { "description": "CSS Lint rule\n\n'false' means rule is off\n'true' means it is a warning\n'2' means the rule is an error", "enum": [2, true, false] } }, - "id": "https://json.schemastore.org/csslintrc.json", "properties": { "adjoining-classes": { "$ref": "#/definitions/rule" diff --git a/src/schemas/json/lego.json b/src/schemas/json/lego.json index f8da14592ec..f32caeaf2f2 100644 --- a/src/schemas/json/lego.json +++ b/src/schemas/json/lego.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/lego.json", "$defs": { "file": { "oneOf": [ @@ -33,7 +34,6 @@ "required": ["name"] } }, - "id": "https://json.schemastore.org/lego.json", "properties": { "blocks": { "description": "An array of your app's blocks.", diff --git a/src/schemas/json/lgtm.json b/src/schemas/json/lgtm.json index 46ba795faf9..8634fff883f 100644 --- a/src/schemas/json/lgtm.json +++ b/src/schemas/json/lgtm.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/lgtm.json", "$comment": "https://lgtm.com/help/lgtm/lgtm.yml-configuration-file", "definitions": { "queryItem": { @@ -29,7 +30,6 @@ } }, "description": "Configuration file for lgtm, for continuous security analysis.", - "id": "https://json.schemastore.org/lgtm.json", "properties": { "path_classifiers": { "title": "Path Classifiers", @@ -39,35 +39,50 @@ "description": "Classify files on this path with the parent tag.", "type": "array", "items": { - "type": ["string", "object"], - "properties": { - "exclude": { - "title": "Exclude", - "description": "Do not classify files on this path with the parent tag.", + "anyOf": [ + { "type": "string" + }, + { + "type": "object", + "properties": { + "exclude": { + "title": "Exclude", + "description": "Do not classify files on this path with the parent tag.", + "type": "string" + } + } } - } + ] } } }, "queries": { - "title": "Queries", - "type": ["array", "null"], - "items": { - "title": "Query", - "properties": { - "exclude": { - "$ref": "#/definitions/queryItem", - "title": "Exclude", - "description": "Hide the results for queries with the specified properties." - }, - "include": { - "$ref": "#/definitions/queryItem", - "title": "Include", - "description": "Show the results for queries with the specified properties." + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "title": "Query", + "properties": { + "exclude": { + "$ref": "#/definitions/queryItem", + "title": "Exclude", + "description": "Hide the results for queries with the specified properties." + }, + "include": { + "$ref": "#/definitions/queryItem", + "title": "Include", + "description": "Show the results for queries with the specified properties." + } + } } + }, + { + "type": "null" } - } + ], + "title": "Queries" }, "extraction": { "title": "Extraction", @@ -120,10 +135,17 @@ }, "build_command": { "title": "Build Command", - "type": ["array", "string"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, "buildless": { "title": "Buildless", @@ -161,6 +183,7 @@ } }, "filetypes": { + "type": "object", "title": "Filetypes", "description": "Specify additional file types to extract.", "additionalProperties": { @@ -173,7 +196,14 @@ "properties": { "version": { "title": "Version", - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, @@ -188,7 +218,14 @@ "java_version": { "title": "Java Version", "description": "Specify the Java version required to build the project.", - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "maven": { "title": "Maven", @@ -208,7 +245,14 @@ "version": { "title": "Version", "description": "Specify the required Maven version.", - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, @@ -284,10 +328,17 @@ "command": { "title": "Command", "description": "Override the default process by specifying a list of commands to run to generate the build configuration.", - "type": ["array", "null"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] } } }, @@ -317,10 +368,17 @@ "requirements_files": { "title": "Requirement Files", "description": "Specify a list of requirements text files to use to set up the environment, or false for none.", - "type": ["array", "boolean"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "boolean" + } + ] }, "setup_py": { "title": "Setup Python", @@ -330,7 +388,14 @@ "version": { "title": "Version", "description": "Override the version of the Python interpreter used for setup and extraction.", - "type": ["string", "number"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], "default": 3 } } diff --git a/src/schemas/json/licenses.1.json b/src/schemas/json/licenses.1.json index 24b85c075d6..2480eb8247b 100644 --- a/src/schemas/json/licenses.1.json +++ b/src/schemas/json/licenses.1.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://tools.wmflabs.org/spdx/schema/licenses.json", "definitions": { "license": { "type": "string", @@ -379,6 +380,5 @@ "wxWindows" ] } - }, - "id": "https://tools.wmflabs.org/spdx/schema/licenses.json" + } } diff --git a/src/schemas/json/modernizrrc.json b/src/schemas/json/modernizrrc.json index ada39434d57..016d6704c0f 100644 --- a/src/schemas/json/modernizrrc.json +++ b/src/schemas/json/modernizrrc.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://json.schemastore.org/modernizrrc.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/modernizrrc.json", "properties": { "classPrefix": { "type": "string", diff --git a/src/schemas/json/mycode.json b/src/schemas/json/mycode.json index 50969d404c9..93ebeaf3e53 100644 --- a/src/schemas/json/mycode.json +++ b/src/schemas/json/mycode.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/mycode.json", "definitions": { "classification": { "enum": ["MyCode", "LibraryCode", "UnrelatedCode"] @@ -12,7 +13,6 @@ } } }, - "id": "https://json.schemastore.org/mycode.json", "properties": { "Eval": { "description": "Script that is executed by passing a string to the host-provided eval function.", diff --git a/src/schemas/json/toolinfo.1.1.0.json b/src/schemas/json/toolinfo.1.1.0.json index 4ab6cdf0131..c9e193d1c1a 100644 --- a/src/schemas/json/toolinfo.1.1.0.json +++ b/src/schemas/json/toolinfo.1.1.0.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://tools.wmflabs.org/toolhub/schema/1.1.0", "authors": ["Hay Kranen", "James Hare"], "definitions": { "tool": { @@ -109,7 +110,7 @@ }, { "type": "string", - "enum": ["*"] + "const": "*" } ], "default": "en", @@ -246,7 +247,6 @@ } }, "description": "A tool is a piece of software that helps facilitate contribution toward, or consumption of, Wikimedia projects and associated data, not including the core wiki software and its extensions", - "id": "https://tools.wmflabs.org/toolhub/schema/1.1.0", "oneOf": [ { "type": "array",