winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ced7e0ad723fb6d34e1360b868f495f66f4c8035
parent 005f765919431d470363d860660228794ad7585e
Author: Ruben Guerrero <rubengu@microsoft.com>
Date:   Thu, 11 May 2023 13:04:55 -0600

Configuration Schema 0.2 (#3241)

Changes:
- Add includePrerelease directive
- Update description of resource id for optional module/resource syntax.

Diffstat:
Mschemas/JSON/configuration/configuration.schema.0.1.json | 2+-
Aschemas/JSON/configuration/configuration.schema.0.2.json | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/schemas/JSON/configuration/configuration.schema.0.1.json b/schemas/JSON/configuration/configuration.schema.0.1.json @@ -1,5 +1,5 @@ { - "$id": "https://aka.ms/schemas/dsc/configuration.schema.0.1.yaml", + "$id": "https://aka.ms/schemas/dsc/configuration.schema.0.1.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A representation of a configuration used by an orchestrator for WinDSC.", "type": "object", diff --git a/schemas/JSON/configuration/configuration.schema.0.2.json b/schemas/JSON/configuration/configuration.schema.0.2.json @@ -0,0 +1,82 @@ +{ + "$id": "https://aka.ms/schemas/dsc/configuration.schema.0.2.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Description of what these resources does to apply the desired state in the configuration", + "type": "object", + "properties": { + "properties": { + "type": "object", + "properties": { + "assertions": { + "type": "array", + "items": { "$ref": "#/$defs/resource" } + }, + "resources": { + "type": "array", + "items": { "$ref": "#/$defs/resource" } + }, + "parameters": { + "type": "array", + "items": { "$ref": "#/$defs/resource" }, + "description": "Resources that retrieve information via a 'get' operation." + }, + "configurationVersion": { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "maxLength": 128, + "default": "0.2.0", + "description": "The configuration syntax version" + } + }, + "required": ["configurationVersion"] + } + }, + + "$defs": { + "resource": { + "type": "object", + "properties": { + "resource": { + "type": "string", + "maxLength": 128, + "description": "The name of the resource. Optionally specify module and resource as module/resource" + }, + "id": { + "type": "string", + "maxLength": 128, + "description": "The identifier of this item." + }, + "dependsOn": { + "type": [ "array", "null" ], + "items": { + "type": "string" + }, + "uniqueItems": true, + "description": "The list of resource ids identifying dependencies." + }, + "directives": { + "type": "object", + "properties": { + "module": { + "type": "string", + "maxLength": 128, + "description": "The name of the module." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "The description of the desired state." + }, + "allowPrerelease": { + "type": "boolean", + "description": "Enable using prerelease modules." + } + }, + "additionalProperties": true + }, + "settings": { "type": "object" } + }, + "required": ["resource"] + } + } +}+ \ No newline at end of file