Skip to content

Commit

Permalink
Configuration schema property descriptions added (#3499)
Browse files Browse the repository at this point in the history
- descriptions were added to other schema properties
- minor grammar/punctuation fixes/changes were made
  • Loading branch information
alexravenna committed Nov 13, 2023
1 parent e6b1d02 commit 12b4240
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .configurations/configuration.dsc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/microsoft/winget-cli-restsource#building-the-client
# Reference: https://github.com/microsoft/winget-cli#building-the-client
properties:
resources:
- resource: Microsoft.Windows.Developer/DeveloperMode
Expand Down
2 changes: 1 addition & 1 deletion schemas/JSON/configuration/configuration.schema.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"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.0",
"description": "The configuration syntax version"
"description": "The configuration syntax version."
}
},
"required": ["configurationVersion"]
Expand Down
169 changes: 88 additions & 81 deletions schemas/JSON/configuration/configuration.schema.0.2.json
Original file line number Diff line number Diff line change
@@ -1,82 +1,89 @@
{
"$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": {

This comment has been minimized.

Copy link
@whywhy2015

whywhy2015 Nov 16, 2023

I DID NOT AGREE TO THIS

"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"]
}
}
{
"$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 do to apply the desired state in the configuration.",
"type": "object",
"properties": {
"properties": {
"type": "object",
"properties": {
"assertions": {
"type": "array",
"items": { "$ref": "#/$defs/resource" },
"description": "The preconditions required to run the configuration."
},
"resources": {
"type": "array",
"items": { "$ref": "#/$defs/resource" },
"description": "A list of resources (software, tools, packages, settings, etc.) to be included in the configuration."
},
"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"],
"description": "The properties of the configuration."
}
},

"$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": "A unique identifier for this resource."
},
"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,
"description": "Information about the module and/or resource."
},
"settings": {
"type": "object",
"description": "Parameters as key-value pairs to be passed to the resource."
}
},
"required": ["resource"]
}
}
}

0 comments on commit 12b4240

Please sign in to comment.