From 29ef6d663cb9f186eeddbc6c796d0f40d43fc95c Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Wed, 16 Sep 2026 01:23:08 +0000 Subject: [PATCH 1/2] Migrated sarif*.json to draft-07 (#6081) Co-authored-by: Edwin Kofler Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 18 --- src/schemas/json/sarif-1.0.0.json | 21 ++- .../sarif-2.0.0-csd.2.beta.2018-10-10.json | 6 +- .../sarif-2.0.0-csd.2.beta.2019-01-09.json | 6 +- .../sarif-2.0.0-csd.2.beta.2019-01-24.json | 6 +- src/schemas/json/sarif-2.0.0.json | 6 +- src/schemas/json/sarif-2.1.0-rtm.0.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0-rtm.1.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0-rtm.2.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0-rtm.3.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0-rtm.4.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0-rtm.5.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0-rtm.6.json | 130 ++++++++++-------- src/schemas/json/sarif-2.1.0.json | 130 ++++++++++-------- ...if-external-property-file-2.1.0-rtm.0.json | 2 +- ...if-external-property-file-2.1.0-rtm.1.json | 2 +- ...if-external-property-file-2.1.0-rtm.2.json | 2 +- ...if-external-property-file-2.1.0-rtm.3.json | 2 +- ...if-external-property-file-2.1.0-rtm.4.json | 2 +- ...if-external-property-file-2.1.0-rtm.5.json | 2 +- .../sarif-external-property-file-2.1.0.json | 2 +- .../json/sarif-external-property-file.json | 2 +- src/schemas/json/sarif.json | 63 ++++++++- src/test/sarif/BinSkim.AllRules.sarif.json | 2 +- src/test/sarif/minimal.sarif.json | 2 +- 25 files changed, 703 insertions(+), 483 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index c27a965b2fd..8934b8730d5 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -153,7 +153,6 @@ "renovate-global-schema-43.json", "renovate-inherited-schema-42.json", "renovate-inherited-schema-43.json", - "sarif-1.0.0.json", "sigmacv.json", "size-limit.json", "stylelintrc.json", @@ -197,23 +196,6 @@ "partial-pyright.json", "pep-723.json", "pyproject.json", - "sarif-2.1.0-rtm.0.json", - "sarif-2.1.0-rtm.1.json", - "sarif-2.1.0-rtm.2.json", - "sarif-2.1.0-rtm.3.json", - "sarif-2.1.0-rtm.4.json", - "sarif-2.1.0-rtm.5.json", - "sarif-2.1.0-rtm.6.json", - "sarif-2.1.0.json", - "sarif-external-property-file-2.1.0-rtm.0.json", - "sarif-external-property-file-2.1.0-rtm.1.json", - "sarif-external-property-file-2.1.0-rtm.2.json", - "sarif-external-property-file-2.1.0-rtm.3.json", - "sarif-external-property-file-2.1.0-rtm.4.json", - "sarif-external-property-file-2.1.0-rtm.5.json", - "sarif-external-property-file-2.1.0.json", - "sarif-external-property-file.json", - "sarif.json", "starlake.json", "metaschema-draft-07-unofficial-strict.json", "glazewm.json", diff --git a/src/schemas/json/sarif-1.0.0.json b/src/schemas/json/sarif-1.0.0.json index afcde85b0e3..809d610c12d 100644 --- a/src/schemas/json/sarif-1.0.0.json +++ b/src/schemas/json/sarif-1.0.0.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/sarif-1.0.0.json", "additionalProperties": false, "definitions": { "annotatedCodeLocation": { @@ -8,10 +9,17 @@ "type": "object", "properties": { "id": { - "description": "OBSOLETE (use \"step\" instead): An identifier for the location, unique within the scope of the code flow within which it occurs.", - "type": ["integer", "string"], - "pattern": "^[1-9][0-9]*$", - "minimum": 1 + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "string", + "pattern": "^[1-9][0-9]*$" + } + ], + "description": "OBSOLETE (use \"step\" instead): An identifier for the location, unique within the scope of the code flow within which it occurs." }, "step": { "description": "The 0-based sequence number of the location in the code flow within which it occurs.", @@ -1072,7 +1080,6 @@ } }, "description": "Static Analysis Results Format (SARIF) Version 1.0.0 JSON Schema: a standard format for the output of static analysis and other tools.", - "id": "https://json.schemastore.org/sarif-1.0.0.json", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", @@ -1081,7 +1088,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["1.0.0"] + "const": "1.0.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.0.0-csd.2.beta.2018-10-10.json b/src/schemas/json/sarif-2.0.0-csd.2.beta.2018-10-10.json index 93f7bbceada..969e007e9a3 100644 --- a/src/schemas/json/sarif-2.0.0-csd.2.beta.2018-10-10.json +++ b/src/schemas/json/sarif-2.0.0-csd.2.beta.2018-10-10.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/sarif-2.0.0-csd.2.beta.2018-10-10.json", "additionalProperties": false, "definitions": { "attachment": { @@ -1542,7 +1543,6 @@ } }, "description": "Static Analysis Results Format (SARIF) Version 2.0.0.csd.2.beta-2018-10-10 JSON Schema: a standard format for the output of static analysis tools.", - "id": "https://json.schemastore.org/sarif-2.0.0-csd.2.beta.2018-10-10.json", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", @@ -1551,7 +1551,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.0.0-csd.2.beta.2018-10-10"] + "const": "2.0.0-csd.2.beta.2018-10-10" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-09.json b/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-09.json index ca2fe0e6f36..00a3f20752a 100644 --- a/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-09.json +++ b/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-09.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/sarif-2.0.0-csd.2.beta.2019-01-09.json", "additionalProperties": false, "definitions": { "attachment": { @@ -1756,7 +1757,6 @@ } }, "description": "Static Analysis Results Format (SARIF) Version 2.0.0-csd.2.beta-2019-01-09 JSON Schema: a standard format for the output of static analysis tools.", - "id": "https://json.schemastore.org/sarif-2.0.0-csd.2.beta.2019-01-09.json", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", @@ -1765,7 +1765,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.0.0-csd.2.beta.2019-01-09"] + "const": "2.0.0-csd.2.beta.2019-01-09" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-24.json b/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-24.json index 04bb64abac8..0871a701f9a 100644 --- a/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-24.json +++ b/src/schemas/json/sarif-2.0.0-csd.2.beta.2019-01-24.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/sarif-2.0.0-csd.2.beta.2019-01-24.json", "additionalProperties": false, "definitions": { "artifact": { @@ -1853,7 +1854,6 @@ } }, "description": "Static Analysis Results Format (SARIF) Version 2.0.0-csd.2.beta-2019-01-24 JSON Schema: a standard format for the output of static analysis tools.", - "id": "https://json.schemastore.org/sarif-2.0.0-csd.2.beta.2019-01-24.json", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", @@ -1862,7 +1862,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.0.0-csd.2.beta.2019-01-24"] + "const": "2.0.0-csd.2.beta.2019-01-24" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.0.0.json b/src/schemas/json/sarif-2.0.0.json index 2a3ea26b228..194a554c4e3 100644 --- a/src/schemas/json/sarif-2.0.0.json +++ b/src/schemas/json/sarif-2.0.0.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/sarif-2.0.0.json", "additionalProperties": false, "definitions": { "attachment": { @@ -1699,7 +1700,6 @@ } }, "description": "Static Analysis Results Format (SARIF) Version 2.0.0 JSON Schema: a standard format for the output of static analysis tools.", - "id": "https://json.schemastore.org/sarif-2.0.0.json", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", @@ -1708,7 +1708,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.0.0"] + "const": "2.0.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.0.json b/src/schemas/json/sarif-2.1.0-rtm.0.json index 0b7f891d135..51979d417a8 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.0.json +++ b/src/schemas/json/sarif-2.1.0-rtm.0.json @@ -449,7 +449,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -611,15 +611,6 @@ "externalPropertyFileReference": { "type": "object", "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -633,9 +624,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -858,18 +862,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -905,9 +897,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1186,18 +1194,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1215,9 +1215,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1333,14 +1345,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1356,9 +1360,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1624,21 +1640,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1650,12 +1651,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2832,7 +2854,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.1.json b/src/schemas/json/sarif-2.1.0-rtm.1.json index f186b9ca206..56b9392e58e 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.1.json +++ b/src/schemas/json/sarif-2.1.0-rtm.1.json @@ -449,7 +449,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -611,15 +611,6 @@ "externalPropertyFileReference": { "type": "object", "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -633,9 +624,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -858,18 +862,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -905,9 +897,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1192,18 +1200,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1221,9 +1221,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1339,14 +1351,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1362,9 +1366,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1630,21 +1646,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1656,12 +1657,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2838,7 +2860,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.2.json b/src/schemas/json/sarif-2.1.0-rtm.2.json index 7cedda3d939..0e2e96cecce 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.2.json +++ b/src/schemas/json/sarif-2.1.0-rtm.2.json @@ -449,7 +449,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -611,15 +611,6 @@ "externalPropertyFileReference": { "type": "object", "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -633,9 +624,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -858,18 +862,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -905,9 +897,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1192,18 +1200,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1221,9 +1221,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1339,14 +1351,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1362,9 +1366,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1630,21 +1646,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1656,12 +1657,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2838,7 +2860,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.3.json b/src/schemas/json/sarif-2.1.0-rtm.3.json index 32e59b08476..2af31f163d7 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.3.json +++ b/src/schemas/json/sarif-2.1.0-rtm.3.json @@ -449,7 +449,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -611,15 +611,6 @@ "externalPropertyFileReference": { "type": "object", "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -633,9 +624,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -858,18 +862,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -905,9 +897,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1192,18 +1200,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1221,9 +1221,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1339,14 +1351,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1362,9 +1366,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1630,21 +1646,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1656,12 +1657,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2838,7 +2860,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.4.json b/src/schemas/json/sarif-2.1.0-rtm.4.json index 425bdfe97ee..370261e690f 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.4.json +++ b/src/schemas/json/sarif-2.1.0-rtm.4.json @@ -453,7 +453,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -617,15 +617,6 @@ "type": "object", "additionalProperties": false, "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -639,9 +630,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -864,18 +868,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -911,9 +903,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1198,18 +1206,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1227,9 +1227,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1345,14 +1357,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1368,9 +1372,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1636,21 +1652,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1662,12 +1663,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2851,7 +2873,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.5.json b/src/schemas/json/sarif-2.1.0-rtm.5.json index 3b38180f6ba..62dce112c36 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.5.json +++ b/src/schemas/json/sarif-2.1.0-rtm.5.json @@ -453,7 +453,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -617,15 +617,6 @@ "type": "object", "additionalProperties": false, "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -639,9 +630,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -864,18 +868,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -911,9 +903,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1198,18 +1206,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1227,9 +1227,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1345,14 +1357,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1368,9 +1372,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1636,21 +1652,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1662,12 +1663,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2851,7 +2873,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0-rtm.6.json b/src/schemas/json/sarif-2.1.0-rtm.6.json index 00bd3747471..039634f7b4d 100644 --- a/src/schemas/json/sarif-2.1.0-rtm.6.json +++ b/src/schemas/json/sarif-2.1.0-rtm.6.json @@ -453,7 +453,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -617,15 +617,6 @@ "type": "object", "additionalProperties": false, "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "format": "uuid" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -639,9 +630,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "format": "uuid" + } + }, "required": ["guid"] } ] @@ -864,18 +868,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -911,9 +903,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1198,18 +1206,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1227,9 +1227,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1345,14 +1357,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1368,9 +1372,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1636,21 +1652,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "format": "uuid" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1662,12 +1663,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "format": "uuid" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2851,7 +2873,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-2.1.0.json b/src/schemas/json/sarif-2.1.0.json index 68fa1c2c578..794dd458894 100644 --- a/src/schemas/json/sarif-2.1.0.json +++ b/src/schemas/json/sarif-2.1.0.json @@ -453,7 +453,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -617,15 +617,6 @@ "type": "object", "additionalProperties": false, "properties": { - "location": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the external property file." - }, - "guid": { - "description": "A stable, unique identifier for the external property file in the form of a GUID.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "itemCount": { "description": "A non-negative integer specifying the number of items contained in the external property file.", "type": "integer", @@ -639,9 +630,22 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the external property file." + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "description": "A stable, unique identifier for the external property file in the form of a GUID.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] } ] @@ -864,18 +868,6 @@ "type": "object", "additionalProperties": false, "properties": { - "runGraphIndex": { - "description": "The index within the run.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "resultGraphIndex": { - "description": "The index within the result.graphs to be associated with the result.", - "type": "integer", - "default": -1, - "minimum": -1 - }, "description": { "$ref": "#/definitions/message", "description": "A description of this graph traversal." @@ -911,9 +903,25 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "description": "The index within the run.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "description": "The index within the result.graphs to be associated with the result.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["resultGraphIndex"] } ] @@ -1198,18 +1206,10 @@ "type": "object", "additionalProperties": false, "properties": { - "text": { - "description": "A plain text message string.", - "type": "string" - }, "markdown": { "description": "A Markdown message string.", "type": "string" }, - "id": { - "description": "The identifier for this message.", - "type": "string" - }, "arguments": { "description": "An array of strings to substitute into the message string.", "type": "array", @@ -1227,9 +1227,21 @@ }, "anyOf": [ { + "properties": { + "text": { + "description": "A plain text message string.", + "type": "string" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "description": "The identifier for this message.", + "type": "string" + } + }, "required": ["id"] } ] @@ -1345,14 +1357,6 @@ "additionalProperties": false, "type": "object", "properties": { - "address": { - "$ref": "#/definitions/address", - "description": "The address of the location." - }, - "artifactLocation": { - "$ref": "#/definitions/artifactLocation", - "description": "The location of the artifact." - }, "region": { "$ref": "#/definitions/region", "description": "Specifies a portion of the artifact." @@ -1368,9 +1372,21 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/address", + "description": "The address of the location." + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/artifactLocation", + "description": "The location of the artifact." + } + }, "required": ["artifactLocation"] } ] @@ -1636,21 +1652,6 @@ "type": "object", "additionalProperties": false, "properties": { - "id": { - "description": "The id of the descriptor.", - "type": "string" - }, - "index": { - "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", - "type": "integer", - "default": -1, - "minimum": -1 - }, - "guid": { - "description": "A guid that uniquely identifies the descriptor.", - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - }, "toolComponent": { "$ref": "#/definitions/toolComponentReference", "description": "A reference used to locate the toolComponent associated with the descriptor." @@ -1662,12 +1663,33 @@ }, "anyOf": [ { + "properties": { + "index": { + "description": "The index into an array of descriptors in toolComponent.ruleDescriptors, toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on context.", + "type": "integer", + "default": -1, + "minimum": -1 + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "description": "A guid that uniquely identifies the descriptor.", + "type": "string", + "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "description": "The id of the descriptor.", + "type": "string" + } + }, "required": ["id"] } ] @@ -2851,7 +2873,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.0.json b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.0.json index 205c9dddd7c..1a5d98090d0 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.0.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.0.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.1.json b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.1.json index fc9f9aa05d8..f5f4006d39a 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.1.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.1.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.2.json b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.2.json index 328596dfff1..8a33102bf9d 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.2.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.2.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.3.json b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.3.json index 3dcd58d486e..296503b8695 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.3.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.3.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.4.json b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.4.json index 7fc1b972c41..047c4461b2a 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.4.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.4.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.5.json b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.5.json index 2a92fcde910..c6088305cc8 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0-rtm.5.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0-rtm.5.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file-2.1.0.json b/src/schemas/json/sarif-external-property-file-2.1.0.json index 53c4dadc740..963d353dbb2 100644 --- a/src/schemas/json/sarif-external-property-file-2.1.0.json +++ b/src/schemas/json/sarif-external-property-file-2.1.0.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif-external-property-file.json b/src/schemas/json/sarif-external-property-file.json index 2a92fcde910..c6088305cc8 100644 --- a/src/schemas/json/sarif-external-property-file.json +++ b/src/schemas/json/sarif-external-property-file.json @@ -10,7 +10,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", diff --git a/src/schemas/json/sarif.json b/src/schemas/json/sarif.json index 51dbf7f8310..2ea26091727 100644 --- a/src/schemas/json/sarif.json +++ b/src/schemas/json/sarif.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/sarif-2.1.0-rtm.5.json", "additionalProperties": false, "definitions": { "address": { @@ -452,7 +453,7 @@ }, "version": { "description": "The SARIF format version of this external properties object.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "guid": { "description": "A stable, unique identifier for this external properties object, in the form of a GUID.", @@ -638,9 +639,19 @@ }, "anyOf": [ { + "properties": { + "location": { + "$ref": "#/definitions/externalPropertyFileReference/properties/location" + } + }, "required": ["location"] }, { + "properties": { + "guid": { + "$ref": "#/definitions/externalPropertyFileReference/properties/guid" + } + }, "required": ["guid"] } ] @@ -910,9 +921,19 @@ }, "oneOf": [ { + "properties": { + "runGraphIndex": { + "$ref": "#/definitions/graphTraversal/properties/runGraphIndex" + } + }, "required": ["runGraphIndex"] }, { + "properties": { + "resultGraphIndex": { + "$ref": "#/definitions/graphTraversal/properties/resultGraphIndex" + } + }, "required": ["resultGraphIndex"] } ] @@ -1226,9 +1247,19 @@ }, "anyOf": [ { + "properties": { + "text": { + "$ref": "#/definitions/message/properties/text" + } + }, "required": ["text"] }, { + "properties": { + "id": { + "$ref": "#/definitions/message/properties/id" + } + }, "required": ["id"] } ] @@ -1367,9 +1398,19 @@ }, "anyOf": [ { + "properties": { + "address": { + "$ref": "#/definitions/physicalLocation/properties/address" + } + }, "required": ["address"] }, { + "properties": { + "artifactLocation": { + "$ref": "#/definitions/physicalLocation/properties/artifactLocation" + } + }, "required": ["artifactLocation"] } ] @@ -1661,12 +1702,27 @@ }, "anyOf": [ { + "properties": { + "index": { + "$ref": "#/definitions/reportingDescriptorReference/properties/index" + } + }, "required": ["index"] }, { + "properties": { + "guid": { + "$ref": "#/definitions/reportingDescriptorReference/properties/guid" + } + }, "required": ["guid"] }, { + "properties": { + "id": { + "$ref": "#/definitions/reportingDescriptorReference/properties/id" + } + }, "required": ["id"] } ] @@ -2842,7 +2898,6 @@ } }, "description": "Static Analysis Results Format (SARIF) Version 2.1.0-rtm.5 JSON Schema: a standard format for the output of static analysis tools.", - "id": "https://json.schemastore.org/sarif-2.1.0-rtm.5.json", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", @@ -2851,7 +2906,7 @@ }, "version": { "description": "The SARIF format version of this log file.", - "enum": ["2.1.0"] + "const": "2.1.0" }, "runs": { "description": "The set of runs contained in this log file.", diff --git a/src/test/sarif/BinSkim.AllRules.sarif.json b/src/test/sarif/BinSkim.AllRules.sarif.json index 8f21b7f1005..ee44cb3858c 100644 --- a/src/test/sarif/BinSkim.AllRules.sarif.json +++ b/src/test/sarif/BinSkim.AllRules.sarif.json @@ -1,5 +1,5 @@ { - "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", + "$schema": "https://www.schemastore.org/sarif-2.1.0.json", "runs": [ { "artifacts": [ diff --git a/src/test/sarif/minimal.sarif.json b/src/test/sarif/minimal.sarif.json index 3014cedd1ea..71218242694 100644 --- a/src/test/sarif/minimal.sarif.json +++ b/src/test/sarif/minimal.sarif.json @@ -1,5 +1,5 @@ { - "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", + "$schema": "https://www.schemastore.org/sarif-2.1.0.json", "runs": [ { "columnKind": "utf16CodeUnits", From 7cd4ffa43d950e6e9d4819e0adb18d1caf05a39b Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Wed, 16 Sep 2026 01:25:50 +0000 Subject: [PATCH 2/2] Migrated project*.json to draft-07 (#6042) Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 8 - src/schemas/json/project-1.0.0-beta3.json | 117 +++-- src/schemas/json/project-1.0.0-beta4.json | 327 +++++++++---- src/schemas/json/project-1.0.0-beta5.json | 117 +++-- src/schemas/json/project-1.0.0-beta6.json | 120 +++-- src/schemas/json/project-1.0.0-beta8.json | 325 +++++++++---- src/schemas/json/project-1.0.0-rc1.json | 325 +++++++++---- src/schemas/json/project-1.0.0-rc2.json | 534 ++++++++++++++------- src/schemas/json/project.json | 536 +++++++++++++++------- 9 files changed, 1700 insertions(+), 709 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 8934b8730d5..68462d69e1a 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -131,14 +131,6 @@ "phrase.json", "pre-commit-config.json", "prisma.json", - "project-1.0.0-beta3.json", - "project-1.0.0-beta4.json", - "project-1.0.0-beta5.json", - "project-1.0.0-beta6.json", - "project-1.0.0-beta8.json", - "project-1.0.0-rc1.json", - "project-1.0.0-rc2.json", - "project.json", "prometheus.json", "putout.json", "pyrseas-0.8.json", diff --git a/src/schemas/json/project-1.0.0-beta3.json b/src/schemas/json/project-1.0.0-beta3.json index 6eede56cdd8..8a054bc53fe 100644 --- a/src/schemas/json/project-1.0.0-beta3.json +++ b/src/schemas/json/project-1.0.0-beta3.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/project-1.0.0-beta3.json", "definitions": { "compilationOptions": { "type": "object", @@ -54,28 +55,41 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build"] + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build"] + } + } } - } + ] } }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-beta3.json", "properties": { "authors": { "type": "array", @@ -86,18 +100,32 @@ }, "bundleExclude": { "description": "List of files to exclude from publish output (kpm bundle).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "code": { "description": "Glob pattern to specify all the code files that needs to be compiled. (data type: string or array with glob pattern(s)). Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**\\*.cs" }, "commands": { @@ -130,10 +158,17 @@ }, "exclude": { "description": "Glob pattern to indicate all the code files to be excluded from compilation. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**/*.*", "obj/**/*.*"] }, "frameworks": { @@ -149,10 +184,17 @@ }, "resources": { "description": "Glob pattern to indicate all the files that need to be compiled as resources.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "Compiler\\Resources\\**\\*.cs" }, "scripts": { @@ -184,10 +226,17 @@ }, "shared": { "description": "Glob pattern to specify the code files to share with dependent projects. Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "Compiler\\Shared\\**\\*.cs" }, "version": { diff --git a/src/schemas/json/project-1.0.0-beta4.json b/src/schemas/json/project-1.0.0-beta4.json index a067d7c5efc..e205e63645d 100644 --- a/src/schemas/json/project-1.0.0-beta4.json +++ b/src/schemas/json/project-1.0.0-beta4.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/project-1.0.0-beta4.json", "definitions": { "compilationOptions": { "type": "object", @@ -54,28 +55,41 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build"] + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build"] + } + } } - } + ] } }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-beta4.json", "properties": { "authors": { "type": "array", @@ -86,154 +100,287 @@ }, "publishExclude": { "description": "List of files to exclude from publish output (dnu publish).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "compile": { "description": "Glob pattern to specify additional code files that needs to be compiled. (data type: string or array with glob pattern(s)). Example: [ \"folder1/**/*.cs\", \"folder2/**/*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "compileExclude": { "description": "Glob pattern to indicate code files that needs to be excluded from compilation. (data type: string or array with glob pattern(s)). Example: [ \"folder1/**/*.cs\", \"folder2/**/*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "compileFiles": { "description": "Individual file paths relative to application root that needs to be included for compilation. (data type: string or array). Example: [ \"folder1/test1.cs\", \"folder2/test2.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "compileBuiltIn": { "description": "Glob pattern to indicate the default code files that are included for compilation. (data type: string or array with glob pattern(s)). Example: [ \"**/*.cs\", \"../folder2/**/*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*.cs" }, "exclude": { "description": "Glob pattern to indicate the default files to be excluded from processing. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "excludeBuiltIn": { "description": "Glob pattern to indicate all the additional files to be excluded from processing. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**/*.*", "obj/**/*.*", "**/*.xproj"] }, "preprocess": { "description": "Glob pattern to indicate all the code files to be pre-processed. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["compiler/preprocess/**/*.cs"] }, "preprocessExclude": { "description": "Glob pattern to indicate all the code files to be excluded from pre-processing. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "preprocessFiles": { "description": "Glob pattern to indicate specific code files to be included for pre-processing. (data type: string or array).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "resource": { "description": "Glob pattern to indicate all the files that need to be compiled as resources. (data type: string or array with glob pattern(s))", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["compiler/resources/**/*", "**/*.resx"] }, "resourceExclude": { "description": "Glob pattern to indicate files that need to be excluded from being compiled as resources. (data type: string or array with glob pattern(s))", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "resourceFiles": { "description": "Glob pattern to indicate individual files that need to be compiled as resources. (data type: string or array).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "shared": { "description": "Glob pattern to specify the code files to share with dependent projects. Example: [ \"folder1/*.cs\", \"folder2/*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/shared/**/*.cs" }, "sharedExclude": { "description": "Glob pattern to specify the code files to be excluded from sharing with dependent projects. Example: [ \"folder1/*.cs\", \"folder2/*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "sharedFiles": { "description": "Glob pattern to specify the individual code files to be shared with dependent projects. Example: [ \"folder1/shared1.cs\", \"folder2/shared2.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "content": { "description": "Glob pattern to specify the files to be considered as content on dnu publish. Example: [ \"folder1/**/*\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*" }, "contentExclude": { "description": "Glob pattern to specify the files to be excluded from being content on dnu publish. Example: [ \"folder1/*.cs\", \"folder2/*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "contentFiles": { "description": "Glob pattern to specify the individual files to be content files on dnu publish. Example: [ \"folder1/content.cs\", \"folder2/content2.img\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "commands": { diff --git a/src/schemas/json/project-1.0.0-beta5.json b/src/schemas/json/project-1.0.0-beta5.json index e874ec9ad85..b6248a95550 100644 --- a/src/schemas/json/project-1.0.0-beta5.json +++ b/src/schemas/json/project-1.0.0-beta5.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/project-1.0.0-beta5.json", "definitions": { "compilationOptions": { "type": "object", @@ -54,28 +55,41 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build"] + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build"] + } + } } - } + ] } }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-beta5.json", "properties": { "authors": { "type": "array", @@ -86,18 +100,32 @@ }, "bundleExclude": { "description": "List of files to exclude from publish output (kpm bundle).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "code": { "description": "Glob pattern to specify all the code files that needs to be compiled. (data type: string or array with glob pattern(s)). Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**\\*.cs" }, "commands": { @@ -181,10 +209,17 @@ }, "exclude": { "description": "Glob pattern to indicate all the code files to be excluded from compilation. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**/*.*", "obj/**/*.*"] }, "frameworks": { @@ -207,10 +242,17 @@ }, "resources": { "description": "Glob pattern to indicate all the files that need to be compiled as resources.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "Compiler\\Resources\\**\\*.cs" }, "scripts": { @@ -242,10 +284,17 @@ }, "shared": { "description": "Glob pattern to specify the code files to share with dependent projects. Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "Compiler\\Shared\\**\\*.cs" }, "version": { diff --git a/src/schemas/json/project-1.0.0-beta6.json b/src/schemas/json/project-1.0.0-beta6.json index 786bc1a5f0f..04b5fbf7f1a 100644 --- a/src/schemas/json/project-1.0.0-beta6.json +++ b/src/schemas/json/project-1.0.0-beta6.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/project-1.0.0-beta6.json", "definitions": { "compilationOptions": { "type": "object", @@ -65,28 +66,41 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build"] + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build"] + } + } } - } + ] } }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-beta6.json", "properties": { "authors": { "type": "array", @@ -97,18 +111,32 @@ }, "bundleExclude": { "description": "List of files to exclude from publish output (kpm bundle).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "" }, "code": { "description": "Glob pattern to specify all the code files that needs to be compiled. (data type: string or array with glob pattern(s)). Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**\\*.cs" }, "commands": { @@ -192,10 +220,17 @@ }, "exclude": { "description": "Glob pattern to indicate all the code files to be excluded from compilation. (data type: string or array with glob pattern(s)).", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**/*.*", "obj/**/*.*"] }, "frameworks": { @@ -222,8 +257,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" } }, "additionalProperties": { @@ -232,10 +266,17 @@ }, "resources": { "description": "Glob pattern to indicate all the files that need to be compiled as resources.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "Compiler\\Resources\\**\\*.cs" }, "scripts": { @@ -267,10 +308,17 @@ }, "shared": { "description": "Glob pattern to specify the code files to share with dependent projects. Example: [ \"Folder1\\*.cs\", \"Folder2\\*.cs\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "Compiler\\Shared\\**\\*.cs" }, "version": { diff --git a/src/schemas/json/project-1.0.0-beta8.json b/src/schemas/json/project-1.0.0-beta8.json index 300532c0b84..07b397e5100 100644 --- a/src/schemas/json/project-1.0.0-beta8.json +++ b/src/schemas/json/project-1.0.0-beta8.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/project-1.0.0-beta8.json", "definitions": { "compilationOptions": { "type": "object", @@ -69,33 +70,46 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build"] - }, - "target": { - "type": "string", - "description": "Restrict this dependency to matching only a Project or a Package", - "enum": ["project", "package"] + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build"] + }, + "target": { + "type": "string", + "description": "Restrict this dependency to matching only a Project or a Package", + "enum": ["project", "package"] + } + } } - } + ] } }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-beta8.json", "properties": { "authors": { "type": "array", @@ -110,135 +124,261 @@ }, "publishExclude": { "description": "Glob pattern to specify files to exclude from publish output. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["obj/**/*.*", "bin/**/*.*", "**/.*/**"] }, "compile": { "description": "Glob pattern to specify files to compile. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*.cs" }, "compileExclude": { "description": "Glob pattern to specify files to exclude from compilation. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "compileFiles": { "description": "Files to include in compilation (overrides 'compileExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "content": { "description": "Glob pattern to specify files to include as content. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*" }, "contentExclude": { "description": "Glob pattern to specify files to exclude from the content list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "contentFiles": { "description": "Files to include as content (overrides 'contentExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocess": { "description": "Glob pattern to specify files to use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/preprocess/**/*.cs" }, "preprocessExclude": { "description": "Glob pattern to specify files to exclude from use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocessFiles": { "description": "Files to include to use for preprocessing (overrides 'preprocessExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resource": { "description": "Glob pattern to specify files to include as resources. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["compiler/resources/**/*", "**/*.resx"] }, "resourceExclude": { "description": "Glob pattern to specify files to exclude from the resources list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resourceFiles": { "description": "Files to include as resources (overrides 'resourceExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "shared": { "description": "Glob pattern to specify files to share with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/shared/**/*.cs" }, "sharedExclude": { "description": "Glob pattern to specify files to exclude from sharing with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "sharedFiles": { "description": "Files to include for sharing with dependent projects (overrides 'sharedExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "exclude": { "description": "Glob pattern to indicate files to exclude from other glob patterns, in addition to the default patterns specified in 'excludeBuiltIn'. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "excludeBuiltIn": { "description": "Default glob pattern to indicate files to exclude from other glob patterns. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**", "obj/**", "**/*.xproj"] }, "commands": { @@ -340,8 +480,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" } }, "additionalProperties": { diff --git a/src/schemas/json/project-1.0.0-rc1.json b/src/schemas/json/project-1.0.0-rc1.json index 83fc3e42b35..63cf2a0d453 100644 --- a/src/schemas/json/project-1.0.0-rc1.json +++ b/src/schemas/json/project-1.0.0-rc1.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/project-1.0.0-rc1.json", "definitions": { "compilationOptions": { "type": "object", @@ -69,33 +70,46 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build"] - }, - "target": { - "type": "string", - "description": "Restrict this dependency to matching only a Project or a Package", - "enum": ["project", "package"] + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build"] + }, + "target": { + "type": "string", + "description": "Restrict this dependency to matching only a Project or a Package", + "enum": ["project", "package"] + } + } } - } + ] } }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-rc1.json", "properties": { "authors": { "type": "array", @@ -110,135 +124,261 @@ }, "publishExclude": { "description": "Glob pattern to specify files to exclude from publish output. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["obj/**/*.*", "bin/**/*.*", "**/.*/**"] }, "compile": { "description": "Glob pattern to specify files to compile. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*.cs" }, "compileExclude": { "description": "Glob pattern to specify files to exclude from compilation. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "compileFiles": { "description": "Files to include in compilation (overrides 'compileExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "content": { "description": "Glob pattern to specify files to include as content. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*" }, "contentExclude": { "description": "Glob pattern to specify files to exclude from the content list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "contentFiles": { "description": "Files to include as content (overrides 'contentExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocess": { "description": "Glob pattern to specify files to use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/preprocess/**/*.cs" }, "preprocessExclude": { "description": "Glob pattern to specify files to exclude from use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocessFiles": { "description": "Files to include to use for preprocessing (overrides 'preprocessExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resource": { "description": "Glob pattern to specify files to include as resources. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["compiler/resources/**/*", "**/*.resx"] }, "resourceExclude": { "description": "Glob pattern to specify files to exclude from the resources list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resourceFiles": { "description": "Files to include as resources (overrides 'resourceExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "shared": { "description": "Glob pattern to specify files to share with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/shared/**/*.cs" }, "sharedExclude": { "description": "Glob pattern to specify files to exclude from sharing with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "sharedFiles": { "description": "Files to include for sharing with dependent projects (overrides 'sharedExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "exclude": { "description": "Glob pattern to indicate files to exclude from other glob patterns, in addition to the default patterns specified in 'excludeBuiltIn'. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "excludeBuiltIn": { "description": "Default glob pattern to indicate files to exclude from other glob patterns. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**", "obj/**", "**/*.xproj"] }, "commands": { @@ -340,8 +480,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" }, "url": { "type": "string", diff --git a/src/schemas/json/project-1.0.0-rc2.json b/src/schemas/json/project-1.0.0-rc2.json index da9723ba32a..d0a2d7237c2 100644 --- a/src/schemas/json/project-1.0.0-rc2.json +++ b/src/schemas/json/project-1.0.0-rc2.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/project-1.0.0-rc2.json", "definitions": { "compilationOptions": { "description": "[Deprecated] Options that are passed to the compiler. Use 'buildOptions' instead.", @@ -167,66 +168,128 @@ }, "compile": { "description": "Defines glob patterns and file path to include for compilation.", - "type": ["string", "array", "object"], - "items": { - "type": "string" - }, - "properties": { - "include": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file globbing patterns to be included." - }, - "exclude": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file globbing patterns to be excluded." - }, - "includeFiles": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file paths to be included." + "anyOf": [ + { + "type": "string" }, - "excludeFiles": { - "type": ["string", "array"], + { + "type": "array", "items": { "type": "string" - }, - "description": "List of file paths to be excluded." + } }, - "builtIns": { - "type": ["string", "array", "object"], - "items": { - "type": "string" - }, + { + "type": "object", "properties": { "include": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "List of file globbing patterns to be included." }, "exclude": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file globbing patterns to be included." + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file globbing patterns to be excluded." + }, + "includeFiles": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file paths to be included." + }, + "excludeFiles": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file paths to be excluded." + }, + "builtIns": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "properties": { + "include": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file globbing patterns to be included." + }, + "exclude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file globbing patterns to be included." + } + } + } + ] + }, + "mappings": { + "type": "object", + "description": "Pairs of destination folders and glob patterns specifying additional files to include/exclude." } } - }, - "mappings": { - "type": "object", - "description": "Pairs of destination folders and glob patterns specifying additional files to include/exclude." } - } + ] }, "embed": { "allOf": [ @@ -374,8 +437,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" }, "url": { "type": "string", @@ -424,11 +486,18 @@ "$ref": "#/definitions/dependencies" }, "imports": { - "type": ["string", "array"], "description": "Allow packages supporting these frameworks to be installed in this target, regardless of the compatibility rules.", - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } } }, @@ -461,43 +530,56 @@ "dependencies": { "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build", "platform"] - }, - "target": { - "type": "string", - "description": "Restrict this dependency to matching only a Project or a Package.", - "enum": ["project", "package"] - }, - "include": { - "$ref": "#/definitions/libraryIncludeFlags" - }, - "exclude": { - "$ref": "#/definitions/libraryIncludeFlags" - }, - "suppressParent": { - "$ref": "#/definitions/libraryIncludeFlags" + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build", "platform"] + }, + "target": { + "type": "string", + "description": "Restrict this dependency to matching only a Project or a Package.", + "enum": ["project", "package"] + }, + "include": { + "$ref": "#/definitions/libraryIncludeFlags" + }, + "exclude": { + "$ref": "#/definitions/libraryIncludeFlags" + }, + "suppressParent": { + "$ref": "#/definitions/libraryIncludeFlags" + } + } } - } + ] }, "description": "Each dependency is defined by a name and a version. Dependencies are resolved from NuGet feeds defined by your package sources and projects located in the directories specified by the 'global.json' file." }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project-1.0.0-rc2.json", "properties": { "authors": { "description": "The author of the application.", @@ -513,135 +595,261 @@ }, "publishExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from publish output. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'publishOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["obj/**/*.*", "bin/**/*.*", "**/.*/**"] }, "compile": { "description": "[Deprecated] Glob pattern to specify files to compile. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'compile' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*.cs" }, "compileExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from compilation. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'compile' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "compileFiles": { "description": "[Deprecated] Files to include in compilation (overrides 'compileExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]. Use 'compile' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "content": { "description": "[Deprecated] Glob pattern to specify files to include as content. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*" }, "contentExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from the content list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "contentFiles": { "description": "[Deprecated] Files to include as content (overrides 'contentExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]. Use 'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocess": { "description": "Glob pattern to specify files to use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/preprocess/**/*.cs" }, "preprocessExclude": { "description": "Glob pattern to specify files to exclude from use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocessFiles": { "description": "Files to include to use for preprocessing (overrides 'preprocessExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resource": { "description": "[Deprecated] Glob pattern to specify files to include as resources. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'embed' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["compiler/resources/**/*", "**/*.resx"] }, "resourceExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from the resources list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'embed' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resourceFiles": { "description": "[Deprecated] Files to include as resources (overrides 'resourceExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]. Use 'embed' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "shared": { "description": "Glob pattern to specify files to share with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/shared/**/*.cs" }, "sharedExclude": { "description": "Glob pattern to specify files to exclude from sharing with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "sharedFiles": { "description": "Files to include for sharing with dependent projects (overrides 'sharedExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "exclude": { "description": "[Deprecated] Glob pattern to indicate files to exclude from other glob patterns, in addition to the default patterns specified in 'excludeBuiltIn'. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'exclude' within 'compile' or 'embed' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "excludeBuiltIn": { "description": "[Deprecated] Default glob pattern to indicate files to exclude from other glob patterns. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'exclude' within 'compile' or 'embed' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**", "obj/**", "**/*.xproj"] }, "testRunner": { @@ -764,8 +972,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" }, "url": { "type": "string", @@ -817,12 +1024,19 @@ "description": "Project-specific command line tools accessible when in the project.json directory.", "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" + }, + { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } } - } + ] } }, "runtimes": { diff --git a/src/schemas/json/project.json b/src/schemas/json/project.json index ab3d9de279b..f3864948b46 100644 --- a/src/schemas/json/project.json +++ b/src/schemas/json/project.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/project.json", "definitions": { "compilationOptions": { "title": "compilation options", @@ -169,67 +170,129 @@ }, "compile": { "description": "Defines glob patterns and file path to include for compilation.", - "type": ["string", "array", "object"], - "items": { - "type": "string" - }, - "properties": { - "include": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file globbing patterns to be included." - }, - "exclude": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file globbing patterns to be excluded." - }, - "includeFiles": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file paths to be included." + "anyOf": [ + { + "type": "string" }, - "excludeFiles": { - "type": ["string", "array"], + { + "type": "array", "items": { "type": "string" - }, - "description": "List of file paths to be excluded." + } }, - "builtIns": { - "type": ["string", "array", "object"], - "items": { - "type": "string" - }, + { + "type": "object", "properties": { "include": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "List of file globbing patterns to be included." }, "exclude": { - "type": ["string", "array"], - "items": { - "type": "string" - }, - "description": "List of file globbing patterns to be included." + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file globbing patterns to be excluded." + }, + "includeFiles": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file paths to be included." + }, + "excludeFiles": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file paths to be excluded." + }, + "builtIns": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "properties": { + "include": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file globbing patterns to be included." + }, + "exclude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "List of file globbing patterns to be included." + } + } + } + ] + }, + "mappings": { + "title": "mapping options", + "type": "object", + "description": "Pairs of destination folders and glob patterns specifying additional files to include/exclude." } } - }, - "mappings": { - "title": "mapping options", - "type": "object", - "description": "Pairs of destination folders and glob patterns specifying additional files to include/exclude." } - } + ] }, "embed": { "allOf": [ @@ -398,8 +461,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" }, "url": { "type": "string", @@ -449,11 +511,18 @@ "$ref": "#/definitions/dependencies" }, "imports": { - "type": ["string", "array"], "description": "Allow packages supporting these frameworks to be installed in this target, regardless of the compatibility rules.", - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } } }, @@ -487,43 +556,56 @@ "title": "dependency options", "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" }, - "type": { - "type": "string", - "default": "default", - "enum": ["default", "build", "platform"] - }, - "target": { - "type": "string", - "description": "Restrict this dependency to matching only a Project or a Package.", - "enum": ["project", "package"] - }, - "include": { - "$ref": "#/definitions/libraryIncludeFlags" - }, - "exclude": { - "$ref": "#/definitions/libraryIncludeFlags" - }, - "suppressParent": { - "$ref": "#/definitions/libraryIncludeFlags" + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "type": { + "type": "string", + "default": "default", + "enum": ["default", "build", "platform"] + }, + "target": { + "type": "string", + "description": "Restrict this dependency to matching only a Project or a Package.", + "enum": ["project", "package"] + }, + "include": { + "$ref": "#/definitions/libraryIncludeFlags" + }, + "exclude": { + "$ref": "#/definitions/libraryIncludeFlags" + }, + "suppressParent": { + "$ref": "#/definitions/libraryIncludeFlags" + } + } } - } + ] }, "description": "Each dependency is defined by a name and a version. Dependencies are resolved from NuGet feeds defined by your package sources and projects located in the directories specified by the 'global.json' file." }, "script": { - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "description": "A command line script or scripts.\r\rAvailable variables:\r%project:Directory% - The project directory\r%project:Name% - The project name\r%project:Version% - The project version" } }, - "id": "https://json.schemastore.org/project.json", "properties": { "authors": { "description": "The author of the application.", @@ -540,135 +622,261 @@ }, "publishExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from publish output. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'publishOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["obj/**/*.*", "bin/**/*.*", "**/.*/**"] }, "compile": { "description": "[Deprecated] Glob pattern to specify files to compile. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'compile' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*.cs" }, "compileExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from compilation. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'compile' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "compileFiles": { "description": "[Deprecated] Files to include in compilation (overrides 'compileExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]. Use 'compile' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "content": { "description": "[Deprecated] Glob pattern to specify files to include as content. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "**/*" }, "contentExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from the content list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "contentFiles": { "description": "[Deprecated] Files to include as content (overrides 'contentExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]. Use 'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocess": { "description": "Glob pattern to specify files to use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/preprocess/**/*.cs" }, "preprocessExclude": { "description": "Glob pattern to specify files to exclude from use for preprocessing. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "preprocessFiles": { "description": "Files to include to use for preprocessing (overrides 'preprocessExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resource": { "description": "[Deprecated] Glob pattern to specify files to include as resources. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'embed' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["compiler/resources/**/*", "**/*.resx"] }, "resourceExclude": { "description": "[Deprecated] Glob pattern to specify files to exclude from the resources list. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'embed' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "resourceFiles": { "description": "[Deprecated] Files to include as resources (overrides 'resourceExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]. Use 'embed' in 'buildOptions' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "shared": { "description": "Glob pattern to specify files to share with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": "compiler/shared/**/*.cs" }, "sharedExclude": { "description": "Glob pattern to specify files to exclude from sharing with dependent projects. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "sharedFiles": { "description": "Files to include for sharing with dependent projects (overrides 'sharedExclude'). (data type: string or array). Example: [ \"Folder1/File1.ext\", \"Folder2/File2.ext\" ]", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "exclude": { "description": "[Deprecated] Glob pattern to indicate files to exclude from other glob patterns, in addition to the default patterns specified in 'excludeBuiltIn'. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'exclude' within 'compile' or 'embed' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "excludeBuiltIn": { "description": "[Deprecated] Default glob pattern to indicate files to exclude from other glob patterns. (data type: string or array with glob pattern(s)). Example: [ \"Folder1/*.ext\", \"Folder2/*.ext\" ]. Use 'exclude' within 'compile' or 'embed' instead.", - "type": ["string", "array"], - "items": { - "type": "string" - }, + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], "default": ["bin/**", "obj/**", "**/*.xproj"] }, "testRunner": { @@ -797,8 +1005,7 @@ "properties": { "type": { "type": "string", - "enum": ["git"], - "default": "git" + "const": "git" }, "url": { "type": "string", @@ -852,12 +1059,19 @@ "description": "Project-specific command line tools accessible when in the project.json directory.", "type": "object", "additionalProperties": { - "type": ["string", "object"], - "properties": { - "version": { + "anyOf": [ + { "type": "string" + }, + { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } } - } + ] } }, "runtimes": {