diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index cb1b30437e6..05d3d9abb0d 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -47,7 +47,6 @@ "cloud-sdk-pipeline-config-schema.json", "cloudify.json", "codeclimate.json", - "codecov.json", "codeship-services.json", "codeship-steps.json", "coffeelint.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" + } ] } },