Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MAINT) Schema improvements #203

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions schemas/2023/08/bundled/config/document.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"description": "This property must be the canonical URL of the DSC Configuration Document schema that the document is implemented for.",
"type": "string",
"format": "uri",
"enum": ["https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json"]
"enum": [
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json"
]
},
"parameters": {
"title": "DSC Configuration document parameters",
Expand Down Expand Up @@ -51,7 +53,9 @@
"title": "Parameter",
"description": "Defines a runtime option for a DSC Configuration Document.",
"type": "object",
"required": "type",
"required": [
"type"
],
"properties": {
"type": {
"$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/parameters/dataTypes.json"
Expand Down Expand Up @@ -351,4 +355,4 @@
"minLength": 1
}
}
}
}
151 changes: 80 additions & 71 deletions schemas/2023/08/bundled/config/document.vscode.json

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion schemas/2023/08/bundled/outputs/config/get.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json"
},
"result": {
"$ref": "/PowerShell/DSC/main/schemas/2023/08/results/resource/get.json"
"$ref": "/PowerShell/DSC/main/schemas/2023/08/outputs/resource/get.json"
}
}
}
Expand Down Expand Up @@ -60,6 +60,23 @@
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/outputs/resource/get.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/outputs/resource/get.json",
"title": "dsc resource get result",
"description": "Describes the return data for a DSC Resource instance from the `dsc resource get` command.",
"type": "object",
"required": [
"actualState"
],
"properties": {
"actualState": {
"title": "Actual state",
"description": "This property always represents the current state of the DSC Resource instance as returned by its `get` method. DSC validates this return value against the DSC Resource's schema.",
"type": "object"
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/definitions/messages.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/definitions/messages.json",
Expand Down
35 changes: 34 additions & 1 deletion schemas/2023/08/bundled/outputs/config/set.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json"
},
"result": {
"$ref": "/PowerShell/DSC/main/schemas/2023/08/results/resource/set.json"
"$ref": "/PowerShell/DSC/main/schemas/2023/08/outputs/resource/set.json"
}
}
}
Expand Down Expand Up @@ -60,6 +60,39 @@
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/outputs/resource/set.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/outputs/resource/set.json",
"title": "dsc resource set result",
"description": "Describes the return data for a DSC Resource instance from the `dsc resource set` command.",
"type": "object",
"required": [
"beforeState",
"afterState",
"changedProperties"
],
"properties": {
"beforeState": {
"title": "State before enforcing",
"description": "This property always represents the desired state of the DSC Resource instance before the `set` method runs. DSC validates this return value against the DSC Resource's schema.",
"type": "object"
},
"afterState": {
"title": "State after enforcing",
"description": "This property always represents the current state of the DSC Resource instance as returned by its `set` method after enforcing the desired state. DSC validates this return value against the DSC Resource's schema.",
"type": "object"
},
"changedProperties": {
"title": "Changed properties",
"description": "This property always represents the list of property names for the DSC Resource instance that the `set` method modified. When this value is an empty array, the `set` method didn't enforce any properties for the instance.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/definitions/messages.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/definitions/messages.json",
Expand Down
41 changes: 40 additions & 1 deletion schemas/2023/08/bundled/outputs/config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"$ref": "/PowerShell/DSC/main/schemas/2023/08/definitions/resourceType.json"
},
"result": {
"$ref": "/PowerShell/DSC/main/schemas/2023/08/results/resource/test.json"
"$ref": "/PowerShell/DSC/main/schemas/2023/08/outputs/resource/test.json"
}
}
}
Expand Down Expand Up @@ -60,6 +60,45 @@
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/outputs/resource/test.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/outputs/resource/test.json",
"title": "dsc resource test result",
"description": "Describes the return data for a DSC Resource instance from the `dsc resource test` command.",
"type": "object",
"required": [
"desiredState",
"actualState",
"inDesiredState",
"differingProperties"
],
"properties": {
"desiredState": {
"title": "Desired state",
"description": "This property always represents the desired state of the DSC Resource instance as specified to DSC.",
"type": "object"
},
"actualState": {
"title": "Actual state",
"description": "This property always represents the current state of the DSC Resource instance as returned by its `test` method or, if the DSC Resource doesn't define the `test` method, by its `get` method. DSC validates this return value against the DSC Resource's schema.",
"type": "object"
},
"inDesiredState": {
"title": "Instance is in the desired state",
"description": "This property indicates whether the instance is in the desired state.",
"type": "boolean"
},
"differingProperties": {
"title": "Differing properties",
"description": "This property always represents the list of property names for the DSC Resource instance that aren't in the desired state. When this property is an empty array, the instance is in the desired state.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/definitions/messages.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/definitions/messages.json",
Expand Down
4 changes: 3 additions & 1 deletion schemas/2023/08/bundled/outputs/resource/get.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"title": "dsc resource get result",
"description": "Describes the return data for a DSC Resource instance from the `dsc resource get` command.",
"type": "object",
"required": "actualState",
"required": [
"actualState"
],
"properties": {
"actualState": {
"title": "Actual state",
Expand Down
Loading