commit e6c9359e7ea53a85c005b9e597ca1bdaa668f0fb
parent 0ddd4058c2c9374fb2a18f7330c7820e89d90f72
Author: Ryan Fu <69221034+ryfu-msft@users.noreply.github.com>
Date: Wed, 15 Mar 2023 10:53:17 -0700
Schema draft for WinGet configure (#2851)
Diffstat:
2 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt
@@ -139,6 +139,7 @@ dotnet
downlevel
downloader
downloaders
+dsc
dsx
dword
DWORDLONG
diff --git a/schemas/JSON/configuration/configuration.schema.0.1.json b/schemas/JSON/configuration/configuration.schema.0.1.json
@@ -0,0 +1,73 @@
+{
+ "$id": "https://aka.ms/schemas/dsc/configuration.schema.0.1.yaml",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "description": "A representation of a configuration used by an orchestrator for WinDSC.",
+ "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.1",
+ "description": "The configuration syntax version"
+ }
+ },
+ "required": ["configurationVersion"],
+
+ "$defs": {
+ "resource": {
+ "type": "object",
+ "properties": {
+ "resource": {
+ "type": "string",
+ "maxLength": 128,
+ "description": "The name of the 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."
+ }
+ },
+ "additionalProperties": true
+ },
+ "settings": { "type": "object" }
+ },
+ "required": ["resource"]
+ }
+ }
+}+
\ No newline at end of file