diff --git a/schemas/src/config/document.yaml b/schemas/src/config/document.yaml index c8d6e44e..e70bd0b8 100644 --- a/schemas/src/config/document.yaml +++ b/schemas/src/config/document.yaml @@ -34,21 +34,45 @@ properties: - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json - https://aka.ms/dsc/schemas/v3/config/document.json - https://aka.ms/dsc/schemas/v3/bundled/config/document.json - https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json + - https://aka.ms/dsc/schemas/v3.1/config/document.json + - https://aka.ms/dsc/schemas/v3.1/bundled/config/document.json + - https://aka.ms/dsc/schemas/v3.1/bundled/config/document.vscode.json + - https://aka.ms/dsc/schemas/v3.1.0/config/document.json + - https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.json + - https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.vscode.json - https://aka.ms/dsc/schemas/v3.0/config/document.json - https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json - https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json - https://aka.ms/dsc/schemas/v3.0.0/config/document.json - https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json - https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json + - https://aka.ms/dsc/schemas/v3.0.1/config/document.json + - https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json + - https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json + - https://aka.ms/dsc/schemas/v3.0.2/config/document.json + - https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json + - https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json # VS Code only: markdownDescription: | *** @@ -146,6 +170,105 @@ properties: > This URI is for the schemas in a major version folder. If you pin to a major version > folder, like `v3`, the schemas you use will update with every nonbreaking release. You > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.yaml + + + > #### `v3.1` non-bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.yaml + + + > #### `v3.1` bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.vscode.yaml + + + > #### `v3.1` enhanced authoring, canonical URI + > + > Indicates that the configuration document adheres to the `v3.1` schema. This URL points + > to the enhanced authoring schema. This schema is much larger than the other schemas, as + > it includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.yaml + + + > #### `v3.1.0` non-bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.1.0` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.yaml + + + > #### `v3.1.0` bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.1.0` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.vscode.yaml + + + > #### `v3.1.0` enhanced authoring, canonical URI + > + > Indicates that the configuration document adheres to the `v3.1.0` schema. This URL + > points to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and + > snippets that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.yaml @@ -245,6 +368,102 @@ properties: > semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change. > However, to take advantage of any improvements or fixes to the schemas, you need to > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.yaml + + + > #### `v3.0.1` non-bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.0.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.yaml + + + > #### `v3.0.1` bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.0.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.yaml + + + > #### `v3.0.1` enhanced authoring, canonical URI + > + > Indicates that the configuration document adheres to the `v3.0.1` schema. This URL + > points to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and + > snippets that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.yaml + + + > #### `v3.0.2` non-bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.0.2` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.yaml + + + > #### `v3.0.2` bundled, canonical URI + > + > Indicates that the configuration document adheres to the `v3.0.2` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.yaml + + + > #### `v3.0.2` enhanced authoring, canonical URI + > + > Indicates that the configuration document adheres to the `v3.0.2` schema. This URL + > points to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and + > snippets that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. - | # https://aka.ms/dsc/schemas/v3/config/document.yaml @@ -290,6 +509,105 @@ properties: > This URI is for the schemas in a major version folder. If you pin to a major version > folder, like `v3`, the schemas you use will update with every nonbreaking release. You > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://aka.ms/dsc/schemas/v3.1/config/document.yaml + + + > #### `v3.1` non-bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1/bundled/config/document.yaml + + + > #### `v3.1` bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1/bundled/config/document.vscode.yaml + + + > #### `v3.1` enhanced authoring, short URI + > + > Indicates that the configuration document adheres to the `v3.1` schema. This URL points + > to the enhanced authoring schema. This schema is much larger than the other schemas, as + > it includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1.0/config/document.yaml + + + > #### `v3.1.0` non-bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.1.0` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.yaml + + + > #### `v3.1.0` bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.1.0` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.vscode.yaml + + + > #### `v3.1.0` enhanced authoring, short URI + > + > Indicates that the configuration document adheres to the `v3.1.0` schema. This URL + > points to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and + > snippets that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. - | # https://aka.ms/dsc/schemas/v3.0/config/document.yaml @@ -389,6 +707,102 @@ properties: > semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change. > However, to take advantage of any improvements or fixes to the schemas, you need to > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.1/config/document.yaml + + + > #### `v3.0.1` non-bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.0.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.yaml + + + > #### `v3.0.1` bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.0.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.yaml + + + > #### `v3.0.1` enhanced authoring, short URI + > + > Indicates that the configuration document adheres to the `v3.0.1` schema. This URL + > points to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and + > snippets that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.2/config/document.yaml + + + > #### `v3.0.2` non-bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.0.2` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.yaml + + + > #### `v3.0.2` bundled, short URI + > + > Indicates that the configuration document adheres to the `v3.0.2` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.yaml + + + > #### `v3.0.2` enhanced authoring, short URI + > + > Indicates that the configuration document adheres to the `v3.0.2` schema. This URL + > points to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and + > snippets that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. parameters: title: DSC configuration document parameters description: >- diff --git a/schemas/src/definitions/extensionType.yaml b/schemas/src/definitions/extensionType.yaml new file mode 100644 index 00000000..0dcd6832 --- /dev/null +++ b/schemas/src/definitions/extensionType.yaml @@ -0,0 +1,40 @@ +# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema +$schema: https://json-schema.org/draft/2020-12/schema +$id: ///definitions/extensionType.yaml + +title: DSC extension fully qualified type name +description: | + The namespaced name of the DSC extension, using the syntax: + + owner[.group][.area]/name + + For example: + + - Microsoft.DSC/Docs + - Microsoft.Windows.Appx/Discover + +type: string +pattern: ^\w+(\.\w+){0,2}\/\w+$ + +# VS Code only +markdownDescription: | + *** + [_Online Documentation_][01] + *** + + The namespaced name of the DSC extension, using the syntax: + + ```yaml + owner[.group][.area]/name + ``` + + For example: + + - `Microsoft.DSC/Docs` + - `Microsoft.Windows.Appx/Discover` + + [01]: /reference/schemas/definitions/extensiontype? +patternErrorMessage: | + Invalid type name. Valid extension type names always define an owner and a name separated by a + slash, like `Microsoft/Example`. Type names may optionally include a group and area to namespace + the extension under the owner, like `Microsoft.Windows.Appx/Discover`. diff --git a/schemas/src/definitions/resourceKind.yaml b/schemas/src/definitions/resourceKind.yaml index e111ef5e..accc162e 100644 --- a/schemas/src/definitions/resourceKind.yaml +++ b/schemas/src/definitions/resourceKind.yaml @@ -13,6 +13,7 @@ enum: - adapter - group - importer + - exporter # VS Code only @@ -56,3 +57,12 @@ markdownEnumDescriptions: Indicates that the manifest is for a resource that resolves an external source to DSC resource instances. DSC processes the resolved instances as nested instances for the importer resource. + - | # exporter + + + Indicates that the manifest is for a resource that only implements the **Export** operation + to use for inventory and fact-gathering scenarios. For exporter resources, DSC expects the + resource to return one or more resource definitions to recursively export, rather than the + actual state of instances. + + For more information about the expected output, see [Export resource operation stdout][02]. diff --git a/schemas/src/extensions/manifest.discover.yaml b/schemas/src/extensions/manifest.discover.yaml new file mode 100644 index 00000000..60e96e37 --- /dev/null +++ b/schemas/src/extensions/manifest.discover.yaml @@ -0,0 +1,86 @@ +# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema +$schema: https://json-schema.org/draft/2020-12/schema +$id: ///extension/manifest.discover.yaml + +title: Get Method +description: >- + Defines how DSC must call the DSC extension to discover the paths to resource manifests. +markdownDescription: | # VS Code only + *** + [_Online Documentation_][00] + *** + + Defines how DSC must call the DSC extension to discover the paths to resource manifests. An + extension that defines this field in its manifest has the `discover` capability. + + By default, DSC only discovers resource manifests in the `PATH` environment variable. If the + `DSC_RESOURCE_PATH` environment variable is defined, DSC searches those paths for resource + manifests instead. + + If initial discovery finds any extension manifests that have the `discover` capability, DSC uses + those extensions to recursively discover resources that aren't available in `PATH` or + `DSC_RESOURCE_PATH`. + + For more information about the output DSC expects the extension to emit for this command, see + [Discover extension operation stdout][01]. + + [00]: /reference/schemas/extension/manifest/discover? + [00]: /reference/schemas/extension/stdout/discover? + +type: object +required: + - executable +properties: + executable: + $ref: ///definitions/commandExecutable.yaml + markdownDescription: | + *** + [_Online Documentation_][01] + *** + + Defines the name of the command to run. The value must be the name of a command discoverable + in the system's `PATH` environment variable or the full path to the command. A file extension + is only required when the command isn't recognizable by the operating system as an + executable. + + [01]: /reference/schemas/extension/manifest/discover?#executable + args: + $ref: ///definitions/commandArgs.yaml + markdownDescription: | + *** + [_Online Documentation_][01] + *** + + Defines an array of strings to pass as arguments to the command. DSC passes the arguments to + the command in the order they're specified. + + For example, the given the following definition: + + ```json + { + "executable": "myextension", + "args": ["discover", "--all"], + } + ``` + + DSC invokes the command for the resource as: + + ```bash + myextension discover --all + ``` + + [01]: /reference/schemas/extension/manifest/discover?#args + +defaultSnippets: # VS Code only + - label: ' Define without arguments' + markdownDescription: | + Define the `discover` command for the extension when no arguments are required. + body: + executable: ${2:executable_name} + - label: ' Define with arguments' + markdownDescription: |- + Define the `discover` command for the extension when at least one argument is required. + body: + executable: ${2:executable_name} + args: + - ${3:--first-argument} diff --git a/schemas/src/extensions/manifest.yaml b/schemas/src/extensions/manifest.yaml new file mode 100644 index 00000000..052b7263 --- /dev/null +++ b/schemas/src/extensions/manifest.yaml @@ -0,0 +1,514 @@ +# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema +$schema: https://json-schema.org/draft/2020-12/schema +$id: ///extension/manifest.yaml + +title: DSC resource manifest +description: >- + Defines the information DSC requires to process and surface a DSC extension. +markdownDescription: | # VS Code only + *** + [_Online Documentation_][01] + *** + + Defines the information DSC requires to process and surface a DSC extension. For DSC to use a + manifest on a system, the manifest file must: + + 1. Be discoverable in the `PATH` environment variable. + 1. Follow the naming convention `.dsc.extension.json`. + 1. Be valid for this schema. + + [01]: /reference/schemas/extension/manifest/root? + +type: object +required: + - $schema + - type + - version +properties: + $schema: + title: Manifest Schema + description: >- + This property must be the canonical URL of the Command-based DSC resource Manifest schema + that the manifest is implemented for. + type: string + format: uri + enum: + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/extension/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/extension/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3/extension/manifest.json + - https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.json + - https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3.1/extension/manifest.json + - https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.json + - https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3.1.0/extension/manifest.json + - https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.json + - https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.vscode.json + # VS Code Only + markdownDescription: | + *** + [_Online Documentation_][00] + *** + + The `$schema` property indicates the canonical URI of this schema that the manifest validates + against. This property is mandatory. DSC uses this value to validate the manifest against the + correct JSON schema. + + The JSON schemas for DSC are published in multiple versions and forms. This documentation is + for the latest version of the schema. As a convenience, you can specify either the full URI + for the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema + for a specific semantic version, the latest schema for a minor version, or the latest schema + for a major version of DSC. For more information about schema URIs and versioning, see + [DSC JSON Schema URIs][01]. + + For every version of the schema, there are three valid urls: + + ```yaml + .../extension/manifest.json + ``` + + > The URL to the canonical non-bundled schema. When it's used for validation, the validating + > client needs to retrieve this schema and every schema it references. + + ```yaml + .../bundled/extension/manifest.json + ``` + + > The URL to the bundled schema. When it's used for validation, the validating client only + > needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + + ```yaml + .../bundled/extension/manifest.vscode.json + ``` + + > The URL to the enhanced authoring schema. This schema is much larger than the other + > schemas, as it includes additional definitions that provide contextual help and snippets + > that the others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + + [00]: /reference/schemas/extension/manifest/root?#schema + [01]: /reference/schemas/schema-uris? + markdownEnumDescriptions: + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/extension/manifest.yaml + + + > #### `v3` non-bundled, canonical URI + > + > Indicates that the extension manifest adheres to the `v3` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a major version folder. If you pin to a major version + > folder, like `v3`, the schemas you use will update with every nonbreaking release. You + > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.yaml + + + > #### `v3` bundled, canonical URI + > + > Indicates that the extension manifest adheres to the `v3` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a major version folder. If you pin to a major version + > folder, like `v3`, the schemas you use will update with every nonbreaking release. You + > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.vscode.yaml + + + > #### `v3` enhanced authoring, canonical URI + > + > Indicates that the extension manifest adheres to the `v3` schema. This URL points to the + > enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a major version folder. If you pin to a major version + > folder, like `v3`, the schemas you use will update with every nonbreaking release. You + > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/extension/manifest.yaml + + + > #### `v3.1` non-bundled, canonical URI + > + > Indicates that the extension manifest adheres to the `v3.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.yaml + + + > #### `v3.1` bundled, canonical URI + > + > Indicates that the extension manifest adheres to the `v3.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.vscode.yaml + + + > #### `v3.1` enhanced authoring, canonical URI + > + > Indicates that the extension manifest adheres to the `v3.1` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.yaml + + + > #### `v3.1.0` non-bundled, canonical URI + > + > Indicates that the extension manifest adheres to the `v3.1.0` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.yaml + + + > #### `v3.1.0` bundled, canonical URI + > + > Indicates that the extension manifest adheres to the `v3.1.0` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.vscode.yaml + + + > #### `v3.1.0` enhanced authoring, canonical URI + > + > Indicates that the extension manifest adheres to the `v3.1.0` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + + - | # https://aka.ms/dsc/schemas/v3/extension/manifest.yaml + + + > #### `v3` non-bundled, short URI + > + > Indicates that the extension manifest adheres to the `v3` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a major version folder. If you pin to a major version + > folder, like `v3`, the schemas you use will update with every nonbreaking release. You + > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.yaml + + + > #### `v3` bundled, short URI + > + > Indicates that the extension manifest adheres to the `v3` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a major version folder. If you pin to a major version + > folder, like `v3`, the schemas you use will update with every nonbreaking release. You + > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.vscode.yaml + + + > #### `v3` enhanced authoring, short URI + > + > Indicates that the extension manifest adheres to the `v3` schema. This URL points to the + > enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a major version folder. If you pin to a major version + > folder, like `v3`, the schemas you use will update with every nonbreaking release. You + > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://aka.ms/dsc/schemas/v3.1/extension/manifest.yaml + + + > #### `v3.1` non-bundled, short URI + > + > Indicates that the extension manifest adheres to the `v3.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.yaml + + + > #### `v3.1` bundled, short URI + > + > Indicates that the extension manifest adheres to the `v3.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.vscode.yaml + + + > #### `v3.1` enhanced authoring, short URI + > + > Indicates that the extension manifest adheres to the `v3.1` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1.0/extension/manifest.yaml + + + > #### `v3.1.0` non-bundled, short URI + > + > Indicates that the extension manifest adheres to the `v3.1.0` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.yaml + + + > #### `v3.1.0` bundled, short URI + > + > Indicates that the extension manifest adheres to the `v3.1.0` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.vscode.yaml + + + > #### `v3.1.0` enhanced authoring, short URI + > + > Indicates that the extension manifest adheres to the `v3.1.0` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + type: + $ref: ///definitions/extensionType.yaml + version: + title: Extension Semantic Version + description: >- + The semantic version (semver) of the DSC extension. + $ref: ///definitions/semver.yaml + markdownDescription: | # VS Code only + *** + [_Online Documentation_][01] + *** + + The semantic version ([semver][02]) of the DSC extension. + + This value uses the [suggested regular expression][03] to validate whether the string is valid + semver. This is the same pattern, made multi-line for easier readability: + + ```regex + ^(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-]+)*))?$ + ``` + + The first line matches the `major.minor.patch` components of the version. The middle lines match + the pre-release components. The last line matches the build metadata component. + + [01]: /reference/schemas/extension/manifest/root?#version + [02]: https://semver.org/ + [03]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string + description: + title: Extension description + description: >- + A short synopsis of the DSC extension's purpose. + type: string + markdownDescription: | # VS Code only + *** + [_Online Documentation_][01] + *** + + Defines a short synopsis of the DSC extension's purpose. + + [01]: /reference/schemas/extension/manifest/root?#description-1 + tags: + title: Tags + description: >- + Defines a list of searchable terms for the extension. + markdownDescription: | # VS Code only + *** + [_Online Documentation_][01] + *** + + Defines a list of searchable terms for the extension. + + [01]: /reference/schemas/extension/manifest/root?#tags + type: array + uniqueItems: true + items: + type: string + pattern: ^\w+$ + patternErrorMessage: | # VS Code only + Invalid tag. Tags must be a string of alphanumeric characters and underscores. No other + characters are permitted. + discover: + $ref: ///extension/manifest.discover.yaml + exitCodes: + # This setting in the root of the schema implies exit codes must have the + # same meaning across all executions. What about implementations that + # support multiple executables? Should exitCodes be a key that exists on + # command/method objects too? + title: Exit codes + description: >- + This property defines a map of valid exit codes for the DSC extension. DSC always interprets + exit code `0` as a successful operation and any other exit code as an error. Use this + property to indicate human-readable semantic meanings for the DSC extension's exit codes. + type: object + propertyNames: + pattern: "^-?[0-9]+$" + patternErrorMessage: | + Invalid exit code. Must be a string representing a 32-bit signed integer. + patternProperties: + "^-?[0-9]+$": + type: string + unevaluatedProperties: false + default: + '0': Success + '1': Error + examples: + - '0': Success + '1': Invalid parameter + '2': Invalid input + '3': JSON serialization failed + # VS Code only + markdownDescription: | + *** + [_Online Documentation_][01] + *** + + This property defines a map of valid exit codes for the DSC extension. DSC always interprets + exit code `0` as a successful operation and any other exit code as an error. Use this + property to indicate human-readable semantic meanings for the DSC extension's exit codes. + + Define the keys in this property as strings representing a valid 32-bit signed integer. You + can't use alternate formats for the exit code. For example, instead of the hexadecimal value + `0x80070005` for "Access denied", specify the exit code as `-2147024891`. If you're authoring + your extension manifest in YAML, be sure to wrap the exit code in single quotes, like + `'0': Success` instead of `0: Success` to ensure the YAML file can be parsed correctly. + + Define the value for each key as a string explaining what the exit code indicates. + + [01]: /reference/schemas/extension/manifest/root?#exitcodes + defaultSnippets: + - label: ' Defined exit codes' + description: Defines exit codes with semantic meaning for the extension. + body: + '0': Success + ${1:first exit code number}: ${2:first exit code meaning} + ${3:second exit code number}: ${4:second exit code meaning} diff --git a/schemas/src/extensions/stdout/discover.yaml b/schemas/src/extensions/stdout/discover.yaml new file mode 100644 index 00000000..1e9e103a --- /dev/null +++ b/schemas/src/extensions/stdout/discover.yaml @@ -0,0 +1,42 @@ +# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema +$schema: https://json-schema.org/draft/2020-12/schema +$id: ///extension/stdout/discover.yaml + +title: Discover extension operation stdout +description: >- + Represents the full path a DSC resource manifest. +markdownDescription: | # VS Code only + *** + [_Online Documentation_][00] + *** + + Represents the full path a DSC resource manifest. DSC expects every JSON Line + emitted to stdout for the **Discover** operation to adhere to this schema. An extension indicates + that it supports the **Discover** operation by defining the [discover][01] field in its manifest. + + The output must be a JSON object. + + [00]: /reference/schemas/extension/stdout/discover? + [01]: /reference/schemas/extension/manifest/discover? + + +type: object +additionalProperties: false +required: + - manifestPath +properties: + manifestPath: + title: DSC manifest path + description: >- + Defines the absolute path to a DSC resource manifest on the system. + markdownDescription: |- + *** + [_Online Documentation_][00] + *** + + Defines the absolute path to a DSC resource manifest on the system. DSC expects this value to + be the absolute path to a manifest file that exists. If this value is a relative path, or if + the manifest doesn't exist, DSC raises an error. + + [00]: /reference/schemas/extension/stdout/discover?#manifestPath + type: string diff --git a/schemas/src/resource/manifest.yaml b/schemas/src/resource/manifest.yaml index 020e1293..49505810 100644 --- a/schemas/src/resource/manifest.yaml +++ b/schemas/src/resource/manifest.yaml @@ -204,21 +204,45 @@ properties: - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json + - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json - https://aka.ms/dsc/schemas/v3/resource/manifest.json - https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json - https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3.1/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3.1.0/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.vscode.json - https://aka.ms/dsc/schemas/v3.0/resource/manifest.json - https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json - https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json - https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json - https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json - https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json + - https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json + - https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json # VS Code Only markdownDescription: | *** @@ -316,6 +340,105 @@ properties: > This URI is for the schemas in a major version folder. If you pin to a major version > folder, like `v3`, the schemas you use will update with every nonbreaking release. You > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/manifest.yaml + + + > #### `v3.1` non-bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.yaml + + + > #### `v3.1` bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.vscode.yaml + + + > #### `v3.1` enhanced authoring, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.1` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.yaml + + + > #### `v3.1.0` non-bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.1.0` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.yaml + + + > #### `v3.1.0` bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.1.0` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.vscode.yaml + + + > #### `v3.1.0` enhanced authoring, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.1.0` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.yaml @@ -402,7 +525,6 @@ properties: > #### `v3.0.0` enhanced authoring, canonical URI > - > Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to > the enhanced authoring schema. This schema is much larger than the other schemas, as it > includes additional definitions that provide contextual help and snippets that the @@ -416,6 +538,102 @@ properties: > semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change. > However, to take advantage of any improvements or fixes to the schemas, you need to > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.yaml + + + > #### `v3.0.1` non-bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.yaml + + + > #### `v3.0.1` bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.yaml + + + > #### `v3.0.1` enhanced authoring, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.yaml + + + > #### `v3.0.2` non-bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.yaml + + + > #### `v3.0.2` bundled, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.yaml + + + > #### `v3.0.2` enhanced authoring, canonical URI + > + > Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. - | # https://aka.ms/dsc/schemas/v3/resource/manifest.yaml @@ -463,6 +681,105 @@ properties: > This URI is for the schemas in a major version folder. If you pin to a major version > folder, like `v3`, the schemas you use will update with every nonbreaking release. You > can use those schemas until you want or need to migrate to a new major version of DSC. + - | # https://aka.ms/dsc/schemas/v3.1/resource/manifest.yaml + + + > #### `v3.1` non-bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.yaml + + + > #### `v3.1` bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.vscode.yaml + + + > #### `v3.1` enhanced authoring, short URI + > + > Indicates that the resource manifest adheres to the `v3.1` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a minor version folder. If you pin to a minor version + > folder, like `v3.1`, the schemas you use will update with every patch release. Pinning + > to a minor version folder enables you to take advantage of fixes to the schemas without + > continually updating your schema URIs. However, to take advantage of any improvements + > or new features, you need to update the URI whenever a new minor version is released. + - | # https://aka.ms/dsc/schemas/v3.1.0/resource/manifest.yaml + + + > #### `v3.1.0` non-bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.1.0` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.yaml + + + > #### `v3.1.0` bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.1.0` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.vscode.yaml + + + > #### `v3.1.0` enhanced authoring, short URI + > + > Indicates that the resource manifest adheres to the `v3.1.0` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. - | # https://aka.ms/dsc/schemas/v3.0/resource/manifest.yaml @@ -562,6 +879,102 @@ properties: > semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change. > However, to take advantage of any improvements or fixes to the schemas, you need to > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.yaml + + + > #### `v3.0.1` non-bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.yaml + + + > #### `v3.0.1` bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.yaml + + + > #### `v3.0.1` enhanced authoring, short URI + > + > Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.yaml + + + > #### `v3.0.2` non-bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL + > points to the canonical non-bundled schema. When it's used for validation, the + > validating client needs to retrieve this schema and every schema it references. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.yaml + + + > #### `v3.0.2` bundled, short URI + > + > Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL + > points to the bundled schema. When it's used for validation, the validating client + > only needs to retrieve this schema. + > + > This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can + > still validate the document when it uses this schema, other tools may error or behave + > in unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. + - | # https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.yaml + + + > #### `v3.0.2` enhanced authoring, short URI + > + > Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to + > the enhanced authoring schema. This schema is much larger than the other schemas, as it + > includes additional definitions that provide contextual help and snippets that the + > others don't include. + > + > This schema uses keywords that are only recognized by VS Code. While DSC can still + > validate the document when it uses this schema, other tools may error or behave in + > unexpected ways. + > + > This URI is for the schemas in a full semantic version folder. If you pin to a full + > semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change. + > However, to take advantage of any improvements or fixes to the schemas, you need to + > update the URI with each release. type: $ref: ///definitions/resourceType.yaml version: diff --git a/schemas/src/resource/stdout/export.yaml b/schemas/src/resource/stdout/export.yaml index e605413f..9a2bb0d5 100644 --- a/schemas/src/resource/stdout/export.yaml +++ b/schemas/src/resource/stdout/export.yaml @@ -11,20 +11,73 @@ markdownDescription: | # VS Code only [_Online Documentation_][00] *** - Represents the actual state of a resource instance in DSC. DSC expects every JSON Line emitted to - stdout for the **Export** operation to adhere to this schema. + DSC expects a resource implementing the **Export** operation to return a series of JSON Lines. - The output must be a JSON object. The object must be a valid representation of an instance of the - resource. + The data that DSC expects depends on whether the resource kind is defined as `exporter`: - Command resources define their instance schema with the [schema.command][01] or - [schema.embedded][02] fields in their resource manifest. If a command resource returns JSON that - is invalid against the resource instance schema, DSC raises an error. - - Adapted resource instances are validated by their adapter when the adapter invokes them. + - When the resource kind is `exporter`, DSC expects the resource to return JSON Lines + representing DSC resource instance definitions to recursively export. + - When the resource kind isn't `exporter`, DSC expects the resource to return JSON Lines + representing the actual state of every instance of the resource on the system. [00]: /reference/schemas/resource/stdout/export? [01]: /reference/schemas/resource/manifest/schema/command? [02]: /reference/schemas/resource/manifest/schema/embedded? -type: object +anyOf: + - title: Typical resource expected output + description: >- + Defines the expected output for a resource whose `kind` isn't `exporter` as the actual state + of every existing instance of that resource on the system. + type: object + markdownDescription: | # VS Code only + *** + [_Online Documentation_][00] + *** + + DSC expects a typical resource implementing the **Export** operation to return a series of + JSON Lines. + + Each JSON Line represents the actual state of a resource instance in DSC. DSC expects every + JSON Line emitted to stdout for the **Export** operation to adhere to this schema. + + The output must be a JSON object. The object must be a valid representation of an instance of + the resource. + + Command resources define their instance schema with the [schema.command][01] or + [schema.embedded][02] fields in their resource manifest. If a command resource returns JSON that + is invalid against the resource instance schema, DSC raises an error. + + Adapted resource instances are validated by their adapter when the adapter invokes them. + + [00]: /reference/schemas/resource/stdout/export?#typical-resource-expected-output + [01]: /reference/schemas/resource/manifest/schema/command? + [02]: /reference/schemas/resource/manifest/schema/embedded? + - title: Exporter resource expected output + description: >- + Defines the expected output for an `exporter` resource as a resource instance definition to + recursively invoke the **Export** operation for. + $ref: ///config/document.resource.yaml + markdownDescription: | # VS Code only + *** + [_Online Documentation_][00] + *** + + DSC expects an exporter resource (one with the `kind` field in its manifest set to + `exporter`) to return a series of JSON Lines. + + Each JSON Line represents a DSC resource instance definition to recursively invoke the + **Export** operation for. DSC expects every JSON Line emitted to stdout for the **Export** + operation to adhere to this schema. + + The output must be a JSON object adhering to [DSC resource instance][01] schema, rather than + the instance schema for a specific resource. DSC expects the object to define at least the + [name][02] and [type][03] fields. If the object defines the [properties][04] field, DSC + passes those properties to the resource when recursively exporting it so that the resource + may filter the exported instance results. + + [00]: /reference/schemas/resource/stdout/export?#typical-resource-expected-output + [01]: /reference/schemas/config/resource? + [02]: /reference/schemas/config/resource?#name + [02]: /reference/schemas/config/resource?#type + [02]: /reference/schemas/config/resource?#properties-1 diff --git a/schemas/v3.0.1/bundled/config/document.json b/schemas/v3.0.1/bundled/config/document.json new file mode 100644 index 00000000..a5dd847c --- /dev/null +++ b/schemas/v3.0.1/bundled/config/document.json @@ -0,0 +1,413 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "title": "DSC configuration document schema", + "description": "Describes a valid DSC configuration document.", + "type": "object", + "required": [ + "$schema", + "resources" + ], + "properties": { + "$schema": { + "title": "Schema", + "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json" + ] + }, + "parameters": { + "title": "DSC configuration document parameters", + "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", + "type": "object", + "additionalProperties": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json" + } + }, + "variables": { + "title": "Configuration variables", + "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", + "type": "object" + }, + "resources": { + "title": "DSC configuration document resources", + "description": "Defines a list of DSC resource instances for the configuration to manage.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + } + }, + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json", + "title": "Parameter", + "description": "Defines a runtime option for a DSC configuration document.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json" + }, + "defaultValue": { + "title": "Default value", + "description": "Defines the default value for the parameter.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json" + }, + "allowedValues": { + "title": "Allowed values", + "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json" + } + }, + "description": { + "title": "Parameter description", + "description": "Defines a synopsis for the parameter explaining its purpose.", + "type": "string" + }, + "metadata": { + "title": "Parameter metadata", + "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", + "type": "object" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "minValue": { + "title": "Minimum value", + "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", + "type": "integer" + }, + "maxValue": { + "title": "Maximum value", + "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", + "type": "integer" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + }, + { + "properties": { + "type": { + "const": "array" + } + } + } + ] + }, + "then": { + "properties": { + "minLength": { + "title": "Minimum length", + "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", + "type": "integer", + "minimum": 0 + }, + "maxLength": { + "title": "Maximum length", + "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", + "type": "integer", + "minimum": 0 + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "string" + }, + "allowedValues": { + "items": { + "type": "string" + } + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "object" + } + } + }, + { + "properties": { + "type": { + "const": "secureObject" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "object" + }, + "allowedValues": { + "items": { + "type": "object" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "integer" + }, + "allowedValues": { + "items": { + "type": "integer" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "allowedValues": { + "items": { + "type": "boolean" + } + } + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json", + "title": "DSC resource instance", + "description": "Defines an instance of a DSC resource in a configuration.", + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "dependsOn": { + "title": "Instance depends on", + "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$" + } + }, + "properties": { + "title": "Managed instance properties", + "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", + "type": "object" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json", + "title": "Configuration metadata", + "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", + "type": "object", + "properties": { + "Microsoft.DSC": { + "type": "object", + "title": "DSC metadata", + "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", + "unevaluatedProperties": false, + "properties": { + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "default": "Current", + "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`." + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json", + "title": "Data Types", + "description": "Defines the data type for the parameter value.", + "type": "string", + "enum": [ + "string", + "secureString", + "int", + "bool", + "object", + "secureObject", + "array" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json", + "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", + "type": [ + "string", + "integer", + "object", + "array", + "boolean" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + } +} diff --git a/schemas/v3.0.1/bundled/config/document.vscode.json b/schemas/v3.0.1/bundled/config/document.vscode.json new file mode 100644 index 00000000..9529b525 --- /dev/null +++ b/schemas/v3.0.1/bundled/config/document.vscode.json @@ -0,0 +1,647 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "title": "DSC configuration document schema", + "description": "Describes a valid DSC configuration document.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDescribes a valid DSC configuration document.\n\nDSC configurations enable users to define state by combining different DSC resources. A\nconfiguration document uses parameters and variables to pass to a set of one or more resources\nthat define a desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "$schema", + "resources" + ], + "properties": { + "$schema": { + "title": "Schema", + "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json" + ], + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the URI that resolves to the version of this schema that the\ndocument adheres to. DSC uses this property when validating and processing the configuration\ndocument.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../config/document.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n \n```yaml\n.../bundled/config/document.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/config/document.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\n> #### `v3` non-bundled\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + ] + }, + "parameters": { + "title": "DSC configuration document parameters", + "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines runtime options for the configuration. Users and integrating tools can override use\nthe defined parameters to pass alternate values to the configuration.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#parameters\n", + "defaultSnippets": [ + { + "label": " New Parameter", + "markdownDescription": "Defines a new runtime option for the configuration.\n\n```yaml\nparameterId:\n type: \n description: \n defaultValue: \n allowedValues:\n - \n```", + "body": { + "${1:parameterId}": { + "type": "$2", + "description": "$3", + "defaultValue": "$4", + "allowedValues": [ + "$5" + ] + } + } + }, + { + "label": " New Integer Parameter", + "markdownDescription": "Defines a new runtime option for the configuration as an integer value.\n\n```yaml\nparameterId:\n type: int\n description: \n defaultValue: \n minValue: \n minValue: \n```", + "body": { + "${1:parameterId}": { + "type": "int", + "description": "$2", + "defaultValue": "$3", + "minValue": "$4", + "maxValue": "$5" + } + } + } + ] + }, + "variables": { + "title": "Configuration variables", + "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", + "type": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of reusable values for the configuration document. The names of this value's\nproperties are the strings used to reference a variable's value.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#variables\n", + "defaultSnippets": [ + { + "label": " New variable property", + "markdownDescription": "Defines a new variable as a key-value pair.\n\n```yaml\nvariableName: variableValue\n```", + "body": { + "${1:variableName}": "${2:variableValue}" + } + }, + { + "label": " New variable property (object)", + "markdownDescription": "Defines a new key-value pair for the variables where the value is an object.\n\n```yaml\nvariableName:\n key: value\n```", + "body": { + "${1:variableName}": { + "${2:key}": "${3:value}" + } + } + }, + { + "label": " New variable property (array)", + "markdownDescription": "Defines a new key-value pair for the variables where the value is an array.\n\n```yaml\nvariableName:\n - firstValue\n - secondValue\n```", + "body": { + "${1:variableName}": [ + "${2:firstValue}", + "${3:secondValue}" + ] + } + } + ] + }, + "resources": { + "title": "DSC configuration document resources", + "description": "Defines a list of DSC resource instances for the configuration to manage.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of DSC resource instances for the configuration to manage.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#resources\n" + }, + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "config": { + "document.parameter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json", + "title": "Parameter", + "description": "Defines a runtime option for a DSC configuration document.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a runtime option for a DSC configuration document.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json" + }, + "defaultValue": { + "title": "Default value", + "description": "Defines the default value for the parameter.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the default value for the parameter.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#allowedvalues\n" + }, + "allowedValues": { + "title": "Allowed values", + "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of valid values for the parameter. If the parameter is defined with any other\nvalues, it's invalid.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#allowedvalues\n" + }, + "description": { + "title": "Parameter description", + "description": "Defines a synopsis for the parameter explaining its purpose.", + "type": "string", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a synopsis for the parameter explaining its purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#description-1\n" + }, + "metadata": { + "title": "Parameter metadata", + "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", + "type": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of key-value pairs for the parameter. This metadata isn't validated.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#metadata-1\n", + "defaultSnippets": [ + { + "label": " New metadata property", + "markdownDescription": "Defines a key-value pair for the metadata:\n\n```yaml\nmetadataName: value\n```", + "body": { + "${1:metadataName}": "${2:value}" + } + }, + { + "label": " New metadata property (object)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an object.\n\n```yaml\nmetadataName:\n key: value\n```", + "body": { + "${1:metadataName}": { + "${2:key}": "${3:value}" + } + } + }, + { + "label": " New metadata property (array)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an array.\n\n```yaml\nmetadataName:\n - firstValue\n - secondValue\n```", + "body": { + "${1:metadataName}": [ + "${2:firstValue}", + "${3:secondValue}" + ] + } + } + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "minValue": { + "title": "Minimum value", + "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", + "type": "integer", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid value for an integer type. If defined with the `maxValue` property,\nthis value must be less than the value of `maxValue`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minvalue\n" + }, + "maxValue": { + "title": "Maximum value", + "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", + "type": "integer", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid value for an integer type. If defined with the `minValue` property,\nthis value must be greater than the value of `minValue`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxvalue\n" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + }, + { + "properties": { + "type": { + "const": "array" + } + } + } + ] + }, + "then": { + "properties": { + "minLength": { + "title": "Minimum length", + "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", + "type": "integer", + "minimum": 0, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `maxLength` property, this value must be less than the value of `maxLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minLength\n" + }, + "maxLength": { + "title": "Maximum length", + "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", + "type": "integer", + "minimum": 0, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `minLength` property, this value must be less than the value of `minLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxLength\n" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "string" + }, + "allowedValues": { + "items": { + "type": "string" + } + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "object" + } + } + }, + { + "properties": { + "type": { + "const": "secureObject" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "object" + }, + "allowedValues": { + "items": { + "type": "object" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "integer" + }, + "allowedValues": { + "items": { + "type": "integer" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "allowedValues": { + "items": { + "type": "boolean" + } + } + } + } + } + ] + }, + "document.resource.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json", + "title": "DSC resource instance", + "description": "Defines an instance of a DSC resource in a configuration.", + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "dependsOn": { + "title": "Instance depends on", + "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$", + "patternErrorMessage": "Invalid value, must be a value like `[resourceId('', '`)], such as\n`[resourceId('Microsoft/OSInfo', 'Foo')]`.\n\nThe `` and `` should be the fully qualified type of the resource and its\nfriendly name in the configuration.\n", + "defaultSnippets": [ + { + "label": " New dependency", + "markdownDescription": "Defines a new dependency for the resource instance.\n\n```yaml\n\"[resourceId('dependencyInstance/Type', 'dependencyInstanceName')]\"\n```", + "bodyText": "\"[resourceId('${3:dependencyInstance/Type}', '${4:dependencyInstanceName}')]\"" + } + ] + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of DSC resource instances that DSC must successfully process before processing\nthis instance. Each value for this property must be the `resourceID()` lookup for another\ninstance in the configuration. Multiple instances can depend on the same instance, but every\ndependency for an instance must be unique in that instance's `dependsOn` property.\n\nThe `resourceID()` function uses this syntax:\n\n```yaml\n\"[resourceId('', '']\"\n```\n\nThe `` value is the `type` property of the dependent resource and\n`` is the dependency's `name` property. When adding a dependency in a\nYAML-format configuration document, always wrap the `resourceID()` lookup in double quotes\n(`\"`).\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#properties-1\n" + }, + "properties": { + "title": "Managed instance properties", + "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", + "type": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties of the DSC resource this instance manages. This property's value must\nbe an object. DSC validates the property's value against the DSC resource's schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#properties-1\n" + } + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an instance of a DSC resource in a configuration.\n\nThe `resources` property of a DSC configuration document always includes at least one DSC resource\ninstance. Together, the instances in a configuration define the desired state that DSC can get,\ntest, and set on a machine.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " New resource instance", + "markdownDescription": "Defines a new instance of a DSC resource for the configuration.\n\n```yaml\ntype: owner[.group][.area]/name\nname: instance_name\nproperties:\n propertyName: propertyValue\n```", + "body": { + "type": "${1:owner[.group][.area]/name}", + "name": "${2:instance_name}", + "properties": { + "${3:propertyName}": "${4:propertyValue}" + } + } + }, + { + "label": " New dependent resource instance", + "markdownDescription": "Defines a new instance of a DSC resource for the configuration that depends on another\ninstance.\n\n```yaml\ntype: owner[.group][.area]/name\nname: instance_name\ndependsOn:\n - \"[resourceId('dependencyInstance/Type', 'dependencyInstanceName')]\"\nproperties:\n propertyName: propertyValue\n```", + "body": { + "type": "${1:owner[.group][.area]/name}", + "name": "${2:instance_name}", + "dependsOn": [ + "\"[resourceId('${3:dependencyInstance/Type}', '${4:dependencyInstanceName}')]\"" + ], + "properties": { + "${5:propertyName}": "${6:propertyValue}" + } + } + } + ] + }, + "document.metadata.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json", + "title": "Configuration metadata", + "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", + "type": "object", + "properties": { + "Microsoft.DSC": { + "type": "object", + "title": "DSC metadata", + "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe `Microsoft.DSC` metadata property contains directives and information that DSC itself\nuses when processing a configuration document. Unlike other metadata key-value pairs, DSC\nvalidates these properties.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", + "unevaluatedProperties": false, + "properties": { + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "default": "Current", + "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines the security context a configuration requires. If you invoke a DSC\noperation against the configuration document in a security context that conflicts with\nthis metadata, DSC raises an error when it validates the configuration document.\n\nThe default security context is `Current`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", + "markdownEnumDescriptions": [ + "\n\n> ### Current security context\n>\n> Indicates that the configuration document is usable under any security context. You\n> can invoke DSC operations against the document when elevated as root or an\n> administrator and as a normal user or account.\n", + "\n\n> ### Elevated security context\n>\n> Indicates that the configuration document is usable only in an elevated security\n> context. You can invoke DSC operations against the document when elevated as root or\n> an administrator. When you invoke DSC operations against the document as a\n> non-elevated user or account, DSC raises an error when it validates the configuration\n> document.\n", + "\n\n> ### Restricted security context\n>\n> Indicates that the configuration document is usable only in a non-elevated security\n> context. You can invoke DSC operations against the document as a non-elevated user or\n> account. When you invoke DSC operations against the document as root or an\n> administrator, DSC raises an error when it validates the configuration document.\n" + ] + } + } + } + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC`\nproperty, this metadata isn't validated. You can pass any data into this property of a\nconfiguration document.\n\nThe `Microsoft.DSC` metadata property contains metadata directives and information that DSC\nitself uses when processing the configuration document. For more information, see\n[Microsoft.DSC][02]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", + "defaultSnippets": [ + { + "label": " New metadata property", + "markdownDescription": "Defines a key-value pair for the metadata:\n\n```yaml\nmetadataName: value\n```", + "body": { + "${1:metadataName}": "${2:value}" + } + }, + { + "label": " New metadata property (object)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an object.\n\n```yaml\nmetadataName:\n key: value\n```", + "body": { + "${1:metadataName}": { + "${2:key}": "${3:value}" + } + } + }, + { + "label": " New metadata property (array)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an array.\n\n```yaml\nmetadataName:\n - firstValue\n - secondValue\n```", + "body": { + "${1:metadataName}": [ + "${2:firstValue}", + "${3:secondValue}" + ] + } + } + ] + } + }, + "definitions": { + "parameters": { + "dataTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json", + "title": "Data Types", + "description": "Defines the data type for the parameter value.", + "type": "string", + "enum": [ + "string", + "secureString", + "int", + "bool", + "object", + "secureObject", + "array" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the data type for the parameter value.\n\nThe valid data types for a parameter are:\n\n- `array` for arrays\n- `bool` for booleans\n- `int` for integers\n- `object` for objects\n- `string` for strings\n- `secureObject` for secure objects\n- `secureString` for secure strings\n\nAccess parameters in a configuration using this syntax:\n\n```yaml\n\"[parameter('')]\"\n```\n\nIn YAML, the parameter syntax needs to be enclosed in double-quotes when used as an inline value.\nIf the syntax isn't quoted, YAML interprets the syntax as an array.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "_Strings are an arbitrary set of text._\n\n> To define a long strings in YAML, use the folded block syntax or literal block syntax by\n> adding a `>` or `|` and a line break after the key. Then, indent the next line. Every line\n> in the string must start at the same level of indentation. You can trim the trailing\n> whitespace by using `>-` or `|-` instead.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#strings\n", + "_Secure strings are text that needs to be handled securely._\n\n> Secure strings are an arbitrary set of text that DSC and integrating tools shouldn't log or\n> record. If a secure data type parameter is used for a resource instance property that doesn't\n> expect a secure value, the resource may still log or record the value. If the resource has\n> independent logging or recording that isn't handled by DSC, the value may be stored\n> insecurely.\n>\n> Use secure strings for passwords and secrets. Never define a default value for secure string\n> parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n", + "_Integer values are numbers without a fractional part._\n\n> Integer values may be limited by integrating tools or the DSC resources they're used with.\n> DSC itself supports integer values between `-9223372036854775808` and `9223372036854775807`.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#integers\n", + "_Boolean values are either `true` or `false`._\n\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#booleans\n", + "_Objects define a set of key-value pairs._\n\n> The value for each key can be any valid data type. The values can be the same type or\n> different types.\n>\n> Access keys in the object using dot-notation. Dot-notation uses this syntax:\n>\n> ```yaml\n> \"[parameters('').]\n> ```\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#objects\n", + "_Secure objects are key-value pairs that need to be handled securely._\n\n> Secure objects define a set of key-value pairs that DSC and integrating tools shouldn't log\n> or record. If a secure data type parameter is used for a resource instance property that\n> doesn't expect a secure value, the resource may still log or record the value. If the\n> resource has independent logging or recording that isn't handled by DSC, the value may be\n> stored insecurely.\n>\n> Never define a default value for secure object parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n", + "_Arrays are a list of one or more values._\n\n> The values in the array can be any valid data type. Values in the array can be the same type\n> or different types.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#arrays\n" + ] + }, + "validValueTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json", + "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", + "type": [ + "string", + "integer", + "object", + "array", + "boolean" + ] + } + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + } + }, + "metadata": { + "Microsoft.DSC": { + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/config/get.json b/schemas/v3.0.1/bundled/outputs/config/get.json new file mode 100644 index 00000000..f3f5d1ca --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/config/get.json @@ -0,0 +1,318 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/get.json", + "title": "Result for `dsc config get` command", + "description": "Represents the data structure returned by the `dsc config get` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `get` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.1/definitions/message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/config/get.vscode.json b/schemas/v3.0.1/bundled/outputs/config/get.vscode.json new file mode 100644 index 00000000..999fe2f7 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/config/get.vscode.json @@ -0,0 +1,352 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/get.json", + "title": "Result for `dsc config get` command", + "description": "Represents the data structure returned by the `dsc config get` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `get` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + }, + "messages": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "metadata": { + "configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "Microsoft.DSC": { + "version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "markdownDescription": "Defines the version of DSC that ran the command. This value is always the semantic version of the\nDSC command, like `3.0.0-preview.7`.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "markdownDescription": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or\n`Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "markdownDescription": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf`\nmode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set`\noperations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the start date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the end date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + }, + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + } + }, + "outputs": { + "resource": { + "get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json" + } + } + }, + "get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + } + ] + }, + "get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + } + }, + "definitions": { + "messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } + }, + "hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/config/set.json b/schemas/v3.0.1/bundled/outputs/config/set.json new file mode 100644 index 00000000..a240f048 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/config/set.json @@ -0,0 +1,334 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/set.json", + "title": "Result for `dsc config set` command", + "description": "Represents the data structure returned by the `dsc config set` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `set` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.1/definitions/message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/config/set.vscode.json b/schemas/v3.0.1/bundled/outputs/config/set.vscode.json new file mode 100644 index 00000000..5b8d9e61 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/config/set.vscode.json @@ -0,0 +1,368 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/set.json", + "title": "Result for `dsc config set` command", + "description": "Represents the data structure returned by the `dsc config set` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `set` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + }, + "messages": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "metadata": { + "configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "Microsoft.DSC": { + "version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "markdownDescription": "Defines the version of DSC that ran the command. This value is always the semantic version of the\nDSC command, like `3.0.0-preview.7`.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "markdownDescription": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or\n`Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "markdownDescription": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf`\nmode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set`\noperations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the start date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the end date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + }, + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + } + }, + "outputs": { + "resource": { + "set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json" + } + } + }, + "set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + } + ] + }, + "set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + } + } + }, + "definitions": { + "messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } + }, + "hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/config/test.json b/schemas/v3.0.1/bundled/outputs/config/test.json new file mode 100644 index 00000000..1e35b83d --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/config/test.json @@ -0,0 +1,340 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/test.json", + "title": "Result for `dsc config test` command", + "description": "Represents the data structure returned by the `dsc config test` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `test` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.1/definitions/message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/config/test.vscode.json b/schemas/v3.0.1/bundled/outputs/config/test.vscode.json new file mode 100644 index 00000000..6e77a91e --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/config/test.vscode.json @@ -0,0 +1,374 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/test.json", + "title": "Result for `dsc config test` command", + "description": "Represents the data structure returned by the `dsc config test` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `test` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + }, + "messages": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "metadata": { + "configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "Microsoft.DSC": { + "version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "markdownDescription": "Defines the version of DSC that ran the command. This value is always the semantic version of the\nDSC command, like `3.0.0-preview.7`.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "markdownDescription": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or\n`Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "markdownDescription": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf`\nmode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set`\noperations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the start date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the end date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + }, + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + } + }, + "outputs": { + "resource": { + "test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json" + } + } + }, + "test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + } + ] + }, + "test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + } + } + }, + "definitions": { + "messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } + }, + "hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/get.json b/schemas/v3.0.1/bundled/outputs/resource/get.json new file mode 100644 index 00000000..3376bed4 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/get.json @@ -0,0 +1,113 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.1/outputs/resource/get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/get.vscode.json b/schemas/v3.0.1/bundled/outputs/resource/get.vscode.json new file mode 100644 index 00000000..ac702a9a --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/get.vscode.json @@ -0,0 +1,139 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "outputs": { + "resource": { + "get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + }, + "get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json" + } + } + } + } + }, + "metadata": { + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "Microsoft.DSC": { + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } + }, + "definitions": { + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/list.json b/schemas/v3.0.1/bundled/outputs/resource/list.json new file mode 100644 index 00000000..bf25e9b8 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/list.json @@ -0,0 +1,1259 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/list.json", + "title": "dsc resource list result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource list` command.", + "type": "object", + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "capabilities": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json" + }, + "description": { + "title": "Resource description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the DSC resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the DSC resource on the file system.", + "type": "string" + }, + "implementedAs": { + "title": "Implemented as", + "description": "Indicates how the DSC resource was implemented.", + "oneOf": [ + { + "title": "Standard implementation", + "description": "Indicates that the DSC resource is implemented as one of the standard implementations built into DSC.", + "type": "string", + "enum": [ + "command" + ] + }, + { + "title": "Custom implementation", + "description": "Indicates that the DSC resource uses a custom implementation. Only adapted resources define this value.", + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "title": "Custom implementation name", + "description": "The name of the custom implementation. This name is determined by the resource adapter.", + "type": "string" + } + } + } + ] + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the DSC resource.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "title": "Properties", + "description": "Defines the DSC resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required DSC resource adapter", + "description": "Defines the fully qualified type name of the DSC resource adapter the DSC resource depends on.", + "oneOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + { + "type": "null" + } + ] + }, + "manifest": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json", + "title": "Resource capabilities", + "description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "set", + "setHandlesExist", + "whatIf", + "test", + "delete", + "export", + "resolve" + ] + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json" + ] + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "get": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json" + }, + "set": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json" + }, + "delete": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json" + }, + "export": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json" + }, + "validate": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ] + }, + "schema": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "default": "state" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources." + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource." + } + } + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": {}, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json" + } + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json" + } + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json" + } + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json" + } + } + } + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command." + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json", + "title": "Instance should exist", + "description": "Indicates whether the DSC resource instance should exist.", + "type": "boolean", + "default": true, + "enum": [ + false, + true + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json", + "title": "Instance is in the Desired State", + "description": "Indicates whether the instance is in the desired state. This property is only returned by the `test` method.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json", + "title": "Purge", + "description": "Indicates that only the components described in the DSC resource should exist. If other components exist, the DSC resource is out of the desired state. When enforcing desired state, the DSC resource removes unmanaged components.", + "type": [ + "boolean", + "null" + ], + "writeOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json", + "title": "Reboot Requested", + "description": "Indicates that the set operation requires a reboot before it's fully complete.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/list.vscode.json b/schemas/v3.0.1/bundled/outputs/resource/list.vscode.json new file mode 100644 index 00000000..505e6f30 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/list.vscode.json @@ -0,0 +1,2115 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/list.json", + "title": "dsc resource list result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource list` command.", + "type": "object", + "properties": { + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "kind": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "capabilities": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json" + }, + "description": { + "title": "Resource description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the DSC resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the DSC resource on the file system.", + "type": "string" + }, + "implementedAs": { + "title": "Implemented as", + "description": "Indicates how the DSC resource was implemented.", + "oneOf": [ + { + "title": "Standard implementation", + "description": "Indicates that the DSC resource is implemented as one of the standard implementations built into DSC.", + "type": "string", + "enum": [ + "command" + ] + }, + { + "title": "Custom implementation", + "description": "Indicates that the DSC resource uses a custom implementation. Only adapted resources define this value.", + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "title": "Custom implementation name", + "description": "The name of the custom implementation. This name is determined by the resource adapter.", + "type": "string" + } + } + } + ] + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the DSC resource.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "title": "Properties", + "description": "Defines the DSC resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required DSC resource adapter", + "description": "Defines the fully qualified type name of the DSC resource adapter the DSC resource depends on.", + "oneOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + { + "type": "null" + } + ] + }, + "manifest": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "definitions": { + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should interpret the resource - as a typical resource, an adapter, a group, or an\nimporter. This property is required for group, exporter, and importer resources.\n\nDSC infers the default value for this property based on whether the [adapter][02] property is\ndefined in the manifest:\n\n- If the `adapter` property is defined in the manifest, the default `kind` is `adapter`.\n- If the `adapter` property is not defined in the manifest, the default `kind` is `resource`.\n\nFor more information about the different kinds of DSC resources, see [DSC resource kinds][01]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/kinds?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\nIndicates that the manifest is for a typical DSC command resource.\n", + "\n\nIndicates that the manifest is for a resource that enables the use of non-command resources\nwith DSC.\n", + "\n\nIndicates that the manifest is for a resource that processes an array of nested resource\ninstances.\n", + "\n\nIndicates that the manifest is for a resource that resolves an external source to DSC\nresource instances. DSC processes the resolved instances as nested instances for the importer\nresource.\n" + ] + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "resourceCapabilities.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json", + "title": "Resource capabilities", + "description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDSC resources always have at least one capability. Resource capabilities define the operations\nyou can invoke for a resource and how the resource behaves when invoked.\n\nFor more information about the operations you can invoke for a resource, see\n[DSC resource operations][01].\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true\n[00]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true", + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "set", + "setHandlesExist", + "whatIf", + "test", + "delete", + "export", + "resolve" + ], + "markdownEnumDescriptions": [ + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `get` capability supports retrieving the current state of an instance\nwith the [Get][01] operation.\n\nA command resource has this capability when its resource manifest defines the [get][02]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#get\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#get-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `set` capability supports enforcing the desired state of an instance with\nthe [Set][01] operation. Resources without this capability can't be used with the\n[dsc resource set][02] or [dsc config set][03] commands unless they're defined in a\n`Microsoft.DSC/Assertion` group as a nested instance.\n\nA command resource has this capability when its resource manifest defines the [set][04]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#set\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#set-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/set?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/cli/config/set?view=dsc-3.0&preserve-view=true\n[04]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `setHandlesExist` capability indicates that you can use the [Set][01]\noperation to delete an instance. Resources with this capability must have the [_exist][02]\ncanonical resource property. Resources that don't have the `_exist` property never have this\ncapability.\n\nWhen a resource has the `_exist` property but not the `setHandlesExist` capability:\n\n- If the resource has the `delete` capability, DSC invokes the [Delete][03] operation instead\n of **Set** when the desired state for an instance defines `_exist` as false.\n- If the resource doesn't have the `delete` capability, DSC raises an error during a **Set**\n operation when the desired state for an instance defines `_exist` as false.\n\nA command resource has this capability when its resource manifest defines the\n[set.handlesExist][04] subproperty as `true`.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#sethandlesexist\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operationsview=dsc-3.0&preserve-view=true#set-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/existview=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operationsview=dsc-3.0&preserve-view=true#delete-operation\n[04]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/setview=dsc-3.0&preserve-view=true#handlesexist", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `whatIf` capability indicates that you can use the [Set][01] operation in\nwhat-if mode to have the resource return explicit information about how it would modify state\nin an actual **Set** operation.\n\nWhen a resource doesn't have this capability, DSC synthesizes how the resource would change\nan instance by converting the **Test** result for the instance into a **Set** result. The\nsynthetic operation can't indicate potential issues or changes that can't be determined by\ncomparing the result of the **Test** operation against the resource's desired state. For\nexample, the credentials used to test a resource might be valid for that operation, but not\nhave permissions to actually modify the system state. Only a resource with this capability\ncan fully report whether and how the resource would change system state.\n\nA resource has this capability when it defines the [whatIf][02] property.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#whatif\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#set-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `test` capability indicates that it implements the [Test][01] operation\ndirectly. Resources with this capability must have the [_inDesiredState][02] canonical\nresource property. Resources that don't have the `_inDesiredState` property never have this\ncapability.\n\nWhen a resource doesn't have this capability, DSC uses a synthetic test for instances of the\nresource. DSC performs the synthetic test by:\n\n1. Invoking the **Get** operation on the resource to retrieve the actual state of the\n instance.\n1. Synthetically testing each property for the desired state of an instance against the\n actual state returned. The synthetic test uses strict, case-sensitive equivalence.\n1. If the desired state for a property and the actual state aren't the same, DSC marks the\n property as out of the desired state.\n1. If any properties are out of the desired state, DSC reports the entire instance as not\n being in the desired state.\n\nSynthetic testing can't account for all resource behaviors. For example, if a package\nresource allows users to define a version range for the package, the **Get** operation\nreturns the actual version of the package, like `1.2.3`. If the user specified the version\nrange `~1` (NPM syntax indicating the package should be latest released semantic version with\nmajor version `1`), DSC would compare the desired state `~1` against the actual state `1.2.3`\nand consider the package to be in the incorrect state, even if `1.2.3` is actually the latest\nrelease matching the version pin.\n\nAny resource that has properties which can't use a strict case-sensitive comparison check\nshould have this capability.\n\nA command resource has this capability when its resource manifest defines the [test][03]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#test\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#test-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/inDesiredState?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `delete` capability supports removing an instance with the [Delete][01]\noperation and the [dsc resource delete][02] command.\n\nThis capability isn't mutually exclusive with the `setHandlesExist` property. A resource can handle\nthe `_exist` property in **Set** operations and be called directly with `dsc resource delete` to\nremove an instance.\n\nFor resources with the `delete` capability and the [_exist][03] canonical resource property:\n\n- If the resource doesn't have the `setHandlesExist` capability, DSC invokes the **Delete**\n operation for the resource instead of **Set** when the desired state defines `_exist` as\n `false`.\n- If the resource does have the `setHandlesExist` capability, DSC invokes the **Set** operation for\n the resource when the desired state defines `_exist` as `false`.\n\nResources with the `delete` capability that don't have the `_exist` canonical resource property\nmust implement their **Set** operation to handle removing instances. DSC can't infer existence\nsemantics without the `_exist` property.\n\nA command resource has this capability when its resource manifest defines the [delete][04]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#delete\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#delete-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/delete?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n[04]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `export` capability supports enumerating every instance of the resource\nwith the [Export][01] operation.\n\nYou can use resources with this capability with the following commands:\n\n- [dsc config export][02] to return a configuration document representing the actual state\n for every instance of each resource defined in the input document.\n- [dsc resource export][03] to return a configuration document representing the actual state\n for every instance of the input resource.\n- `dsc resource get` with the [--all][04] option to return the actual state of every instance\n of the input resource.\n\nA command resource has this capability when its resource manifest defines the [export][05]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#export\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operationsview=dsc-3.0&preserve-view=true#export-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/cli/config/export?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/export?view=dsc-3.0&preserve-view=true\n[04]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/get?view=dsc-3.0&preserve-view=true#--all\n[05]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `resolve` capability supports resolving nested resource instances from an\nexternal source. This capability is primarily used by [importer resources][01] to enable users to\ncompose configuration documents.\n\nA command resource has this capability when its resource manifest defines the [resolve][0220]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#resolve\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/kinds?view=dsc-3.0&preserve-view=true#importer-resources\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true" + ] + } + }, + "commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "defaultSnippets": [ + { + "label": "String argument", + "markdownDescription": "Add a string argument to the command, like `config` or `--config`.", + "body": "${1:argument_name}" + }, + { + "label": "JSON input argument", + "markdownDescription": "Add a JSON input argument to the command. A command can only define one JSON input argument\nin the `args` list. When you define a JSON input argument, DSC passes the input data for\nthe command to the specified argument as a string representing the data as a compressed\nJSON object. The compressed JSON object doesn't have any spaces or newlines between the\nobject properties and values.\n\nIf the command doesn't define the `input` property, it must define a JSON input argument.\n\nIf the command defines both the `input` property and a JSON input argument, DSC sends the\ninput data to the command in both ways. For example, if the command defines `input` as\n`stdin` and has a JSON input argument in `args`, DSC sends the input data as a compressed\nJSON object over stdin and to the the specified argument.", + "body": { + "jsonInputArg": "${1:argument_name}", + "mandatory": "^$2" + } + } + ], + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command.", + "markdownDescription": "Any item in the argument array can be a string representing a static argument to pass to\nthe command.\n" + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "markdownDescription": "Defines an argument for the command that accepts the JSON input object as a string. DSC\npasses the JSON input to the named argument when available. You can define the `mandatory`\nproperty to indicate whether DSC should always pass the argument to the command, even when\nthere's no JSON input for the command. In that case, DSC passes an empty string to the\nJSON input argument. You can only define one JSON input argument per arguments array.\n\nIf you define a JSON input argument and an `input` kind for a command, DSC sends the JSON\ndata both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "markdownDescription": "Defines the argument that accepts the JSON property bag for the resource as input.\n", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "markdownDescription": "Defines whether the argument is mandatory. If this property is set to `true`, DSC\npasses an empty string when no JSON input is provided. The default value is `false`.\n", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ], + "markdownEnumDescriptions": [ + "_Environment variables_\n\n> Indicates that the resource expects the properties of an instance to be specified as\n> environment variables with the same names and casing.\n>\n> This option only supports the following data types for instance properties:\n>\n> - `boolean`\n> - `integer`\n> - `number`\n> - `string`\n> - `array` of `integer` values\n> - `array` of `number` values\n> - `array` of `string` values\n>\n> For non-array values, DSC sets the environment variable to the specified value as-is. When\n> the data type is an array of values, DSC sets the environment variable as a comma-delimited\n> string. For example, the property `foo` with a value of `[1, 2, 3]` is saved in the `foo`\n> environment variable as `\"1,2,3\"`.\n>\n> If the resource needs to support complex properties with an `object` value or multi-type\n> arrays, set this to `stdin` instead.\n", + "_JSON over `stdin`_\n\n> Indicates that the resource expects a JSON blob representing an instance from `stdin`.\n> The JSON must adhere to the instance schema.\n" + ] + }, + "returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + } + }, + "resource": { + "manifest.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the information DSC and integrating require to process and call a DSC command resource.\nFor DSC to use a manifest on a system, the manifest file must:\n\n1. Be discoverable in the `PATH` environment variable.\n1. Follow the naming convention `.dsc.resource.json`.\n1. Be valid for this schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define a resource", + "markdownDescription": "Defines a standard resource that:\n\n- Can get the current state of an instance\n- Can set an instance to the desired state\n- Relies on DSC's synthetic testing to determine whether an instance is in the desired state\n- Defines an embedded JSON schema.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "set": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "implementsPretest": "^${11:false}", + "return": "${12:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (group)", + "markdownDescription": "Defines a group resource that expects a list of resource instances and operates on them.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "group", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${18|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${19:Resources}", + "description": "${20:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + } + }, + "${21:name}": { + "title": "${22:property title}", + "description": "${23:explanation of property purpose and usage}", + "type": "${24|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (adapter)", + "markdownDescription": "Defines an adapter resource that enables users to define non-command DSC resources in the\nconfiguration.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "adapter", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "adapter": { + "config": "${18|full,sequence|}", + "list": { + "executable": "${19:executable name}", + "args": [ + "${20:argument}" + ] + } + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${23|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${24:Resources}", + "description": "${25:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + } + }, + "${26:name}": { + "title": "${27:property title}", + "description": "${28:explanation of property purpose and usage}", + "type": "${29|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (importer)", + "markdownDescription": "Defines an importer resource that can resolve an external source to nested resource\ninstances.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "importer", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "resolve": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (assertion-only)", + "markdownDescription": "Defines an assertion resource that can get the current state of an instance but not configure\nit. By default, the resource relies on DSC's synthetic testing feature. If the resource\nimplements the `test` operation itself, define the `test` property.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + } + ], + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json" + ], + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\n> #### `v3` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + ] + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe semantic version ([semver][02]) of the DSC resource. This version identifies the DSC\nResource, not the version of the application it manages.\n\nThis value uses the [suggested regular expression][03] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#version\n[02]: https://semver.org/\n[03]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a short synopsis of the DSC resource's purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#description-1\n" + }, + "kind": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of searchable terms for the resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#tags\n", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$", + "patternErrorMessage": "Invalid tag. Tags must be a string of alphanumeric characters and underscores. No other\ncharacters are permitted.\n" + } + }, + "get": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json" + }, + "set": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json" + }, + "delete": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json" + }, + "export": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json" + }, + "validate": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$", + "patternErrorMessage": "Invalid exit code. Must be a string representing a 32-bit signed integer.\n" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines a map of valid exit codes for the DSC resource. DSC always interprets\nexit code `0` as a successful operation and any other exit code as an error. Use this\nproperty to indicate human-readable semantic meanings for the DSC resource's exit codes.\n\nDefine the keys in this property as strings representing a valid 32-bit signed integer. You\ncan't use alternate formats for the exit code. For example, instead of the hexadecimal value\n`0x80070005` for \"Access denied\", specify the exit code as `-2147024891`. If you're authoring\nyour resource manifest in yaml, be sure to wrap the exit code in single quotes, like\n`'0': Success` instead of `0: Success` to ensure the YAML file can be parsed correctly.\n\nDefine the value for each key as a string explaining what the exit code indicates.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#exitcodes\n", + "defaultSnippets": [ + { + "label": " Defined exit codes", + "description": "Defines exit codes with semantic meaning for the resource.", + "body": { + "0": "Success", + "${1:first exit code number}": "${2:first exit code meaning}", + "${3:second exit code number}": "${4:second exit code meaning}" + } + } + ] + }, + "schema": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ] + }, + "manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of an instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Get resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/get?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"get\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property. When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"get\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `get` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `get` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `get` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `get` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `get` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to set the desired state of an instance and how to\nprocess the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Set resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/set?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set` command. Set this value to `true` if the DSC resource tests input before modifying\nsystem state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set` command where the instance defines the `_exist` property as `false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's state after the set\noperation or the state and an array of the properties the DSC resource modified.\n\nWhen a manifest doesn't define `set.return`, DSC doesn't expect the resource to emit any\nJSON to stdout. Instead, DSC invokes the **Get** operation for the resource to construct\nthe result object, retrieving the actual state of the resource after the **Set** operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's final state after the set\n> operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's final state and an array of property\n> names that the resource modified.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `set` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `set` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `set` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `set` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `set` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to indicate whether and how the set command will\nmodify an instance and how to process the output from the DSC resource. If a resource doesn't\ndefine this command in the manifest, DSC synthesizes this behavior by converting the result of\nthe test operation for the resource into the [set result][01].\n\nThis command definition has the same structure as the [set command][02] in the resource manifest.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[What-if resource operation stdout][03].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/outputs/resource/set?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/whatif?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\", \"--what-if\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n \"--what-if\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set --what-if` command . Set this value to `true` if the DSC resource tests input before\nprocessing how it will modify system state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set --what-if` command where the instance defines the `_exist` property as\n`false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's expected state after a\nset operation in what-if mode or the state and an array of the properties the DSC resource\nwould modify.\n\nUnlike the `set.return` property, you must specify a value for `whatIf.return` for the\nresource to function correctly. When you don't define `set.return` in your resource manifest,\nDSC invokes the **Get** operation on the resource after the **Set** operation to construct\nthe result with the final state of the resource.\n\nFor what-if operations, the resource doesn't actually change the system, so invoking the\n**Get** operation after the what-if command executes will always show the final state to\nbe the same as the before state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's expected final state after the\n> set operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's expected final state and an array of\n> property names that the resource would modify.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `whatIf` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `whatIf` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `whatIf` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `whatIf` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `whatIf` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to test if an instance is in the desired state and how\nto process the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Test resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/test?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"test\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"test\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#input\n" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "default": "state", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's current state or the\nstate and an array of the properties that are out of the desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Actual state only_\n\n> Indicates that the resource returns only the instance's actual state as a JSON blob.\n", + "_Actual state and differing properties_\n\n> Indicates that the resource returns the instance's actual state and an array of\n> property names that are out of the desired state.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `test` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `test` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `test` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `test` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + "${4:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `test` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "return": "${1|state,stateAndDiff|}", + "executable": "${2:executable_name}", + "args": [ + { + "jsonInputArg": "${3:argument_name}", + "mandatory": "^$4" + } + ] + } + } + ] + }, + "manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to delete an instance. Define this method for\nresources as an alternative to handling the [`_exist`][01] property in a `set` operation, which\ncan lead to highly complex code. If the `set` method for the resource is able to handle deleting\nan instance when `_exist` is `false`, set the [`handlesExist`][02] property of the set method\ndefinition to `true` instead.\n\nIf you define the delete method in a resource manifest, ensure that you also define the\n[`_exist`][01] property in the [JSON schema for the resource's properties][03].\n\nDSC doesn't expect this command to return any output to stdout.\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"delete\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config delete\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `delete` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `delete` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `delete` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `delete` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `delete` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of every instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Export resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/export?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"export\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"export\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `export` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `export` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `export` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `export` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `export` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^3" + } + ] + } + } + ] + }, + "manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to validate the state of an instance. This method is\nmandatory for DSC group resources. It's ignored for all other DSC resources.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Validate resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/validate?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"validate\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"validate\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `validate` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `validate` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `validate` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `validate` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `validate` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to resolve an external source to nested DSC\nconfiguration document. Define this method for [importer resources][02] and set the [kind][03]\nproperty in the manifest root to `importer`.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Resolve resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/resolve?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceKind?view=dsc-3.0&preserve-view=true#importer-resources\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"resolve\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"resolve\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `resolve` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `resolve` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `resolve` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `resolve` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `resolve` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource adapter to list its supported DSC resources.\n\nFor more information about the output DSC expects from the resource for this command,\nsee [List resource operation stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/list?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", + "markdownEnumDescriptions": [ + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}" + } + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + } + } + ] + }, + "manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"schema\", \"show\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource schema show\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#args\n" + } + }, + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob\nrepresenting an instance of the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Schema resource command stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/schema?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `schema` command for the resource when no arguments are required.\n", + "body": { + "executable": "${1:executable_name}" + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the `schema` command for the resource when at least one argument is required.\n", + "body": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + ] + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON Schema DSC must use to validate a JSON blob representing an instance of the\nDSC resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type. DSC only supports JSON Schema Draft 07 and later.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n", + "markdownEnumDescriptions": [ + "_Draft 2020-12 (recommended)_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2020-12][01].\n>\n> This is the latest published draft of JSON Schema and is the draft future drafts\n> will be most compatible with.\n\n[01]: https://json-schema.org/specification-links.html#2020-12\n", + "_Draft 2019-09_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2019-09][01].\n>\n> This is the previous published draft of JSON Schema. It's mostly compatible with\n> 2020-12, but less extensible and can't be bundled.\n\n[01]: https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8\n", + "_Draft 07_\n\n> Indicates that the resource instance schema adheres to [JSON Schema Draft 07][01].\n>\n> This is an older published draft of JSON Schema. It's widely used, but incompatible\n> with 2019-09 and later. It's less expressive, extensible, maintainable, and isn't\n> recommended for new schema definitions.\n\n[01]: https://json-schema.org/specification-links.html#draft-7\n" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the unique ID for the DSC resource's instance schema. If the instance schema is\npublished to its own public URI, set this keyword to that URI.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#id\n" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties that DSC can retrieve and manage for the resource's instances.\nThis keyword must define at least one property as a key-value pair. The key is the\nproperty's name. The value is a subschema that validates the property.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#properties\n", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": { + "defaultSnippets": [ + { + "label": " Define a property", + "markdownDescription": "Define a new property for the resource instance schema.", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + }, + { + "label": " Define a property (boolean)", + "markdownDescription": "Define a new [boolean][01] property for the resource instance schema, requiring the\nvalue to be either `true` or `false`.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/boolean.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "boolean" + } + }, + { + "label": " Define a property (string)", + "markdownDescription": "Define a new [string][01] property for the resource instance schema, requiring the\nvalue to be a blob of text.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/string.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "string" + } + }, + { + "label": " Define a property (integer)", + "markdownDescription": "Define a new [integer][01] property for the resource instance schema, requiring the\nvalue to be a number without a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "integer" + } + }, + { + "label": " Define a property (number)", + "markdownDescription": "Define a new [number][01] property for the resource instance schema, requiring the\nvalue to be a number that may include a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "number" + } + }, + { + "label": " Define a property (array)", + "markdownDescription": "Define a new [array][01] property for the resource instance schema, requiring the\nvalue to be a list of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/array.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "array", + "items": { + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + } + }, + { + "label": " Define a property (object)", + "markdownDescription": "Define a new [object][01] property for the resource instance schema, requiring the\nvalue to be a set of key-value pairs.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/object.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "object", + "properties": { + "${3:propertyName}": { + "title": "${4:propertyTitle}", + "description": "${5:explanation of property purpose and usage}", + "type": "${6|string,integer,number,array,object,null|}" + } + } + } + }, + { + "label": " Define a property (enum)", + "markdownDescription": "Define a new [enum][01] property for the resource instance schema that only accepts\na defined set of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "enum": [ + "^${3:\"first value\"}", + "^${4:\"second value\"}" + ] + } + }, + { + "label": " Define a property (const)", + "markdownDescription": "Define a new [const][01] property for the resource instance schema that only\naccepts a specific value.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "const": "^${3:\"constant value\"}" + } + } + ] + }, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the resource can enforce whether instances exist, handling whether an\ninstance should be added, updated, or removed during a set operation. The default\nvalue is `true`.\n\nResources that define this property declare that the implementation adheres to the\nfollowing behavior contract:\n\n1. When the desired state for `_exist` is `true`, the resource expects the instance\n to exist. If it doesn't exist, the resource creates or adds the instance during\n the set operation.\n1. When the desired state for `_exist` is `false`, the resource expects the instance\n to not exist. If it does exist, the resource deletes or removes the instance\n during the set operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource returns this value for it's own `test` method. This\nproperty is mandatory when the manifest defines the `test` property. It shouldn't\nbe included if the DSC resource relies on DSC's synthetic testing.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/indesiredstate?view=dsc-3.0&preserve-view=true\n" + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_purge` property to specify\nwhether the DSC resource should remove all non-specified members when it manages\nan array of members or values.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/purge?view=dsc-3.0&preserve-view=true\n" + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_rebootRequested` property to\nreport whether the machine should be rebooted after the `set` method executes.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/rebootrequested?view=dsc-3.0&preserve-view=true\n" + } + }, + "defaultSnippets": [ + { + "label": " Define an instance property", + "markdownDescription": "Define a property for the resource instance schema.", + "body": { + "${1:propertyName}": { + "title": "${2:property title}", + "description": "${3:explanation of property purpose and usage}", + "type": "${4|string,integer,number,array,object,null|}" + } + } + } + ] + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must validate a JSON blob representing an instance of the DSC resource.\n\nThe JSON schema can be defined dynamically with the `command` property or statically with the\n`embedded` property.\n\nFor development purposes, it can be more convenient to use the `command` property and avoid\nneeding to adjust both the code and the schema.\n\nMicrosoft recommends using the `embedded` property when publishing a resource publicly. When the\nmanifest declares the schema with the `command` property, DSC calls the command at the beginning\nof any operation using the resource, possibly impacting performance. The schema is also\nunavailable to integrating tools when the resource isn't installed locally. When the schema is\nembedded in the manifest, DSC and integrating tools only need the manifest itself.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define as command without arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when no arguments are required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}" + } + } + }, + { + "label": " Define as command with arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when at least one argument is required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + }, + { + "label": " Define as an embedded schema", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema embedded in the manifest. This is the preferred option\nfor publicly published resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "body": { + "embedded": { + "${escape_dollar:$}schema": "${1|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${2:name}": { + "title": "${3:property title}", + "description": "${4:explanation of property purpose and usage}", + "type": "${5|string,integer,number,array,object,null|}" + } + } + } + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/schema.json b/schemas/v3.0.1/bundled/outputs/resource/schema.json new file mode 100644 index 00000000..55a0f32b --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/schema.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/schema.vscode.json b/schemas/v3.0.1/bundled/outputs/resource/schema.vscode.json new file mode 100644 index 00000000..55a0f32b --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/schema.vscode.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/set.json b/schemas/v3.0.1/bundled/outputs/resource/set.json new file mode 100644 index 00000000..503d513d --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/set.json @@ -0,0 +1,129 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.1/outputs/resource/set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/set.vscode.json b/schemas/v3.0.1/bundled/outputs/resource/set.vscode.json new file mode 100644 index 00000000..b910028a --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/set.vscode.json @@ -0,0 +1,155 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "outputs": { + "resource": { + "set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + }, + "set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json" + } + } + } + } + }, + "metadata": { + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "Microsoft.DSC": { + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } + }, + "definitions": { + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/test.json b/schemas/v3.0.1/bundled/outputs/resource/test.json new file mode 100644 index 00000000..87c0f0b7 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/test.json @@ -0,0 +1,135 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.1/outputs/resource/test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/resource/test.vscode.json b/schemas/v3.0.1/bundled/outputs/resource/test.vscode.json new file mode 100644 index 00000000..43698553 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/resource/test.vscode.json @@ -0,0 +1,161 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "outputs": { + "resource": { + "test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + }, + "test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json" + } + } + } + } + }, + "metadata": { + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "Microsoft.DSC": { + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } + }, + "definitions": { + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/bundled/outputs/schema.json b/schemas/v3.0.1/bundled/outputs/schema.json new file mode 100644 index 00000000..15bec1a1 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/schema.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.1/bundled/outputs/schema.vscode.json b/schemas/v3.0.1/bundled/outputs/schema.vscode.json new file mode 100644 index 00000000..15bec1a1 --- /dev/null +++ b/schemas/v3.0.1/bundled/outputs/schema.vscode.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.1/bundled/resource/manifest.json b/schemas/v3.0.1/bundled/resource/manifest.json new file mode 100644 index 00000000..2eebd743 --- /dev/null +++ b/schemas/v3.0.1/bundled/resource/manifest.json @@ -0,0 +1,1142 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json" + ] + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "get": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json" + }, + "set": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json" + }, + "delete": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json" + }, + "export": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json" + }, + "validate": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ] + }, + "schema": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "default": "state" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources." + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource." + } + } + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": {}, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json" + } + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json" + } + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json" + } + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json" + } + } + } + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command." + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json", + "title": "Instance should exist", + "description": "Indicates whether the DSC resource instance should exist.", + "type": "boolean", + "default": true, + "enum": [ + false, + true + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json", + "title": "Instance is in the Desired State", + "description": "Indicates whether the instance is in the desired state. This property is only returned by the `test` method.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json", + "title": "Purge", + "description": "Indicates that only the components described in the DSC resource should exist. If other components exist, the DSC resource is out of the desired state. When enforcing desired state, the DSC resource removes unmanaged components.", + "type": [ + "boolean", + "null" + ], + "writeOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json", + "title": "Reboot Requested", + "description": "Indicates that the set operation requires a reboot before it's fully complete.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + } + } +} diff --git a/schemas/v3.0.1/bundled/resource/manifest.vscode.json b/schemas/v3.0.1/bundled/resource/manifest.vscode.json new file mode 100644 index 00000000..fc330add --- /dev/null +++ b/schemas/v3.0.1/bundled/resource/manifest.vscode.json @@ -0,0 +1,1987 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the information DSC and integrating require to process and call a DSC command resource.\nFor DSC to use a manifest on a system, the manifest file must:\n\n1. Be discoverable in the `PATH` environment variable.\n1. Follow the naming convention `.dsc.resource.json`.\n1. Be valid for this schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define a resource", + "markdownDescription": "Defines a standard resource that:\n\n- Can get the current state of an instance\n- Can set an instance to the desired state\n- Relies on DSC's synthetic testing to determine whether an instance is in the desired state\n- Defines an embedded JSON schema.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "set": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "implementsPretest": "^${11:false}", + "return": "${12:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (group)", + "markdownDescription": "Defines a group resource that expects a list of resource instances and operates on them.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "group", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${18|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${19:Resources}", + "description": "${20:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + } + }, + "${21:name}": { + "title": "${22:property title}", + "description": "${23:explanation of property purpose and usage}", + "type": "${24|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (adapter)", + "markdownDescription": "Defines an adapter resource that enables users to define non-command DSC resources in the\nconfiguration.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "adapter", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "adapter": { + "config": "${18|full,sequence|}", + "list": { + "executable": "${19:executable name}", + "args": [ + "${20:argument}" + ] + } + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${23|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${24:Resources}", + "description": "${25:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + } + }, + "${26:name}": { + "title": "${27:property title}", + "description": "${28:explanation of property purpose and usage}", + "type": "${29|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (importer)", + "markdownDescription": "Defines an importer resource that can resolve an external source to nested resource\ninstances.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "importer", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "resolve": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (assertion-only)", + "markdownDescription": "Defines an assertion resource that can get the current state of an instance but not configure\nit. By default, the resource relies on DSC's synthetic testing feature. If the resource\nimplements the `test` operation itself, define the `test` property.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + } + ], + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json" + ], + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\n> #### `v3` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + ] + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe semantic version ([semver][02]) of the DSC resource. This version identifies the DSC\nResource, not the version of the application it manages.\n\nThis value uses the [suggested regular expression][03] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#version\n[02]: https://semver.org/\n[03]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a short synopsis of the DSC resource's purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#description-1\n" + }, + "kind": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of searchable terms for the resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#tags\n", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$", + "patternErrorMessage": "Invalid tag. Tags must be a string of alphanumeric characters and underscores. No other\ncharacters are permitted.\n" + } + }, + "get": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json" + }, + "set": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json" + }, + "delete": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json" + }, + "export": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json" + }, + "validate": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$", + "patternErrorMessage": "Invalid exit code. Must be a string representing a 32-bit signed integer.\n" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines a map of valid exit codes for the DSC resource. DSC always interprets\nexit code `0` as a successful operation and any other exit code as an error. Use this\nproperty to indicate human-readable semantic meanings for the DSC resource's exit codes.\n\nDefine the keys in this property as strings representing a valid 32-bit signed integer. You\ncan't use alternate formats for the exit code. For example, instead of the hexadecimal value\n`0x80070005` for \"Access denied\", specify the exit code as `-2147024891`. If you're authoring\nyour resource manifest in yaml, be sure to wrap the exit code in single quotes, like\n`'0': Success` instead of `0: Success` to ensure the YAML file can be parsed correctly.\n\nDefine the value for each key as a string explaining what the exit code indicates.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#exitcodes\n", + "defaultSnippets": [ + { + "label": " Defined exit codes", + "description": "Defines exit codes with semantic meaning for the resource.", + "body": { + "0": "Success", + "${1:first exit code number}": "${2:first exit code meaning}", + "${3:second exit code number}": "${4:second exit code meaning}" + } + } + ] + }, + "schema": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.1": { + "definitions": { + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should interpret the resource - as a typical resource, an adapter, a group, or an\nimporter. This property is required for group, exporter, and importer resources.\n\nDSC infers the default value for this property based on whether the [adapter][02] property is\ndefined in the manifest:\n\n- If the `adapter` property is defined in the manifest, the default `kind` is `adapter`.\n- If the `adapter` property is not defined in the manifest, the default `kind` is `resource`.\n\nFor more information about the different kinds of DSC resources, see [DSC resource kinds][01]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/kinds?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\nIndicates that the manifest is for a typical DSC command resource.\n", + "\n\nIndicates that the manifest is for a resource that enables the use of non-command resources\nwith DSC.\n", + "\n\nIndicates that the manifest is for a resource that processes an array of nested resource\ninstances.\n", + "\n\nIndicates that the manifest is for a resource that resolves an external source to DSC\nresource instances. DSC processes the resolved instances as nested instances for the importer\nresource.\n" + ] + }, + "commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "defaultSnippets": [ + { + "label": "String argument", + "markdownDescription": "Add a string argument to the command, like `config` or `--config`.", + "body": "${1:argument_name}" + }, + { + "label": "JSON input argument", + "markdownDescription": "Add a JSON input argument to the command. A command can only define one JSON input argument\nin the `args` list. When you define a JSON input argument, DSC passes the input data for\nthe command to the specified argument as a string representing the data as a compressed\nJSON object. The compressed JSON object doesn't have any spaces or newlines between the\nobject properties and values.\n\nIf the command doesn't define the `input` property, it must define a JSON input argument.\n\nIf the command defines both the `input` property and a JSON input argument, DSC sends the\ninput data to the command in both ways. For example, if the command defines `input` as\n`stdin` and has a JSON input argument in `args`, DSC sends the input data as a compressed\nJSON object over stdin and to the the specified argument.", + "body": { + "jsonInputArg": "${1:argument_name}", + "mandatory": "^$2" + } + } + ], + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command.", + "markdownDescription": "Any item in the argument array can be a string representing a static argument to pass to\nthe command.\n" + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "markdownDescription": "Defines an argument for the command that accepts the JSON input object as a string. DSC\npasses the JSON input to the named argument when available. You can define the `mandatory`\nproperty to indicate whether DSC should always pass the argument to the command, even when\nthere's no JSON input for the command. In that case, DSC passes an empty string to the\nJSON input argument. You can only define one JSON input argument per arguments array.\n\nIf you define a JSON input argument and an `input` kind for a command, DSC sends the JSON\ndata both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "markdownDescription": "Defines the argument that accepts the JSON property bag for the resource as input.\n", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "markdownDescription": "Defines whether the argument is mandatory. If this property is set to `true`, DSC\npasses an empty string when no JSON input is provided. The default value is `false`.\n", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ], + "markdownEnumDescriptions": [ + "_Environment variables_\n\n> Indicates that the resource expects the properties of an instance to be specified as\n> environment variables with the same names and casing.\n>\n> This option only supports the following data types for instance properties:\n>\n> - `boolean`\n> - `integer`\n> - `number`\n> - `string`\n> - `array` of `integer` values\n> - `array` of `number` values\n> - `array` of `string` values\n>\n> For non-array values, DSC sets the environment variable to the specified value as-is. When\n> the data type is an array of values, DSC sets the environment variable as a comma-delimited\n> string. For example, the property `foo` with a value of `[1, 2, 3]` is saved in the `foo`\n> environment variable as `\"1,2,3\"`.\n>\n> If the resource needs to support complex properties with an `object` value or multi-type\n> arrays, set this to `stdin` instead.\n", + "_JSON over `stdin`_\n\n> Indicates that the resource expects a JSON blob representing an instance from `stdin`.\n> The JSON must adhere to the instance schema.\n" + ] + }, + "returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + } + }, + "resource": { + "manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of an instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Get resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/get?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"get\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property. When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"get\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `get` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `get` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `get` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `get` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `get` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to set the desired state of an instance and how to\nprocess the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Set resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/set?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set` command. Set this value to `true` if the DSC resource tests input before modifying\nsystem state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set` command where the instance defines the `_exist` property as `false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's state after the set\noperation or the state and an array of the properties the DSC resource modified.\n\nWhen a manifest doesn't define `set.return`, DSC doesn't expect the resource to emit any\nJSON to stdout. Instead, DSC invokes the **Get** operation for the resource to construct\nthe result object, retrieving the actual state of the resource after the **Set** operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's final state after the set\n> operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's final state and an array of property\n> names that the resource modified.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `set` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `set` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `set` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `set` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `set` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to indicate whether and how the set command will\nmodify an instance and how to process the output from the DSC resource. If a resource doesn't\ndefine this command in the manifest, DSC synthesizes this behavior by converting the result of\nthe test operation for the resource into the [set result][01].\n\nThis command definition has the same structure as the [set command][02] in the resource manifest.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[What-if resource operation stdout][03].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/outputs/resource/set?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/whatif?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\", \"--what-if\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n \"--what-if\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set --what-if` command . Set this value to `true` if the DSC resource tests input before\nprocessing how it will modify system state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set --what-if` command where the instance defines the `_exist` property as\n`false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's expected state after a\nset operation in what-if mode or the state and an array of the properties the DSC resource\nwould modify.\n\nUnlike the `set.return` property, you must specify a value for `whatIf.return` for the\nresource to function correctly. When you don't define `set.return` in your resource manifest,\nDSC invokes the **Get** operation on the resource after the **Set** operation to construct\nthe result with the final state of the resource.\n\nFor what-if operations, the resource doesn't actually change the system, so invoking the\n**Get** operation after the what-if command executes will always show the final state to\nbe the same as the before state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's expected final state after the\n> set operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's expected final state and an array of\n> property names that the resource would modify.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `whatIf` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `whatIf` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `whatIf` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `whatIf` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `whatIf` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to test if an instance is in the desired state and how\nto process the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Test resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/test?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"test\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"test\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#input\n" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "default": "state", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's current state or the\nstate and an array of the properties that are out of the desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Actual state only_\n\n> Indicates that the resource returns only the instance's actual state as a JSON blob.\n", + "_Actual state and differing properties_\n\n> Indicates that the resource returns the instance's actual state and an array of\n> property names that are out of the desired state.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `test` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `test` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `test` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `test` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + "${4:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `test` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "return": "${1|state,stateAndDiff|}", + "executable": "${2:executable_name}", + "args": [ + { + "jsonInputArg": "${3:argument_name}", + "mandatory": "^$4" + } + ] + } + } + ] + }, + "manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to delete an instance. Define this method for\nresources as an alternative to handling the [`_exist`][01] property in a `set` operation, which\ncan lead to highly complex code. If the `set` method for the resource is able to handle deleting\nan instance when `_exist` is `false`, set the [`handlesExist`][02] property of the set method\ndefinition to `true` instead.\n\nIf you define the delete method in a resource manifest, ensure that you also define the\n[`_exist`][01] property in the [JSON schema for the resource's properties][03].\n\nDSC doesn't expect this command to return any output to stdout.\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"delete\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config delete\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `delete` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `delete` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `delete` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `delete` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `delete` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of every instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Export resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/export?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"export\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"export\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `export` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `export` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `export` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `export` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `export` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^3" + } + ] + } + } + ] + }, + "manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to validate the state of an instance. This method is\nmandatory for DSC group resources. It's ignored for all other DSC resources.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Validate resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/validate?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"validate\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"validate\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `validate` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `validate` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `validate` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `validate` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `validate` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to resolve an external source to nested DSC\nconfiguration document. Define this method for [importer resources][02] and set the [kind][03]\nproperty in the manifest root to `importer`.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Resolve resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/resolve?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceKind?view=dsc-3.0&preserve-view=true#importer-resources\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"resolve\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"resolve\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `resolve` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `resolve` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `resolve` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `resolve` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `resolve` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource adapter to list its supported DSC resources.\n\nFor more information about the output DSC expects from the resource for this command,\nsee [List resource operation stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/list?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", + "markdownEnumDescriptions": [ + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}" + } + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + } + } + ] + }, + "manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"schema\", \"show\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource schema show\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#args\n" + } + }, + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob\nrepresenting an instance of the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Schema resource command stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/schema?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `schema` command for the resource when no arguments are required.\n", + "body": { + "executable": "${1:executable_name}" + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the `schema` command for the resource when at least one argument is required.\n", + "body": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + ] + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON Schema DSC must use to validate a JSON blob representing an instance of the\nDSC resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type. DSC only supports JSON Schema Draft 07 and later.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n", + "markdownEnumDescriptions": [ + "_Draft 2020-12 (recommended)_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2020-12][01].\n>\n> This is the latest published draft of JSON Schema and is the draft future drafts\n> will be most compatible with.\n\n[01]: https://json-schema.org/specification-links.html#2020-12\n", + "_Draft 2019-09_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2019-09][01].\n>\n> This is the previous published draft of JSON Schema. It's mostly compatible with\n> 2020-12, but less extensible and can't be bundled.\n\n[01]: https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8\n", + "_Draft 07_\n\n> Indicates that the resource instance schema adheres to [JSON Schema Draft 07][01].\n>\n> This is an older published draft of JSON Schema. It's widely used, but incompatible\n> with 2019-09 and later. It's less expressive, extensible, maintainable, and isn't\n> recommended for new schema definitions.\n\n[01]: https://json-schema.org/specification-links.html#draft-7\n" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the unique ID for the DSC resource's instance schema. If the instance schema is\npublished to its own public URI, set this keyword to that URI.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#id\n" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties that DSC can retrieve and manage for the resource's instances.\nThis keyword must define at least one property as a key-value pair. The key is the\nproperty's name. The value is a subschema that validates the property.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#properties\n", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": { + "defaultSnippets": [ + { + "label": " Define a property", + "markdownDescription": "Define a new property for the resource instance schema.", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + }, + { + "label": " Define a property (boolean)", + "markdownDescription": "Define a new [boolean][01] property for the resource instance schema, requiring the\nvalue to be either `true` or `false`.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/boolean.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "boolean" + } + }, + { + "label": " Define a property (string)", + "markdownDescription": "Define a new [string][01] property for the resource instance schema, requiring the\nvalue to be a blob of text.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/string.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "string" + } + }, + { + "label": " Define a property (integer)", + "markdownDescription": "Define a new [integer][01] property for the resource instance schema, requiring the\nvalue to be a number without a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "integer" + } + }, + { + "label": " Define a property (number)", + "markdownDescription": "Define a new [number][01] property for the resource instance schema, requiring the\nvalue to be a number that may include a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "number" + } + }, + { + "label": " Define a property (array)", + "markdownDescription": "Define a new [array][01] property for the resource instance schema, requiring the\nvalue to be a list of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/array.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "array", + "items": { + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + } + }, + { + "label": " Define a property (object)", + "markdownDescription": "Define a new [object][01] property for the resource instance schema, requiring the\nvalue to be a set of key-value pairs.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/object.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "object", + "properties": { + "${3:propertyName}": { + "title": "${4:propertyTitle}", + "description": "${5:explanation of property purpose and usage}", + "type": "${6|string,integer,number,array,object,null|}" + } + } + } + }, + { + "label": " Define a property (enum)", + "markdownDescription": "Define a new [enum][01] property for the resource instance schema that only accepts\na defined set of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "enum": [ + "^${3:\"first value\"}", + "^${4:\"second value\"}" + ] + } + }, + { + "label": " Define a property (const)", + "markdownDescription": "Define a new [const][01] property for the resource instance schema that only\naccepts a specific value.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "const": "^${3:\"constant value\"}" + } + } + ] + }, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the resource can enforce whether instances exist, handling whether an\ninstance should be added, updated, or removed during a set operation. The default\nvalue is `true`.\n\nResources that define this property declare that the implementation adheres to the\nfollowing behavior contract:\n\n1. When the desired state for `_exist` is `true`, the resource expects the instance\n to exist. If it doesn't exist, the resource creates or adds the instance during\n the set operation.\n1. When the desired state for `_exist` is `false`, the resource expects the instance\n to not exist. If it does exist, the resource deletes or removes the instance\n during the set operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource returns this value for it's own `test` method. This\nproperty is mandatory when the manifest defines the `test` property. It shouldn't\nbe included if the DSC resource relies on DSC's synthetic testing.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/indesiredstate?view=dsc-3.0&preserve-view=true\n" + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_purge` property to specify\nwhether the DSC resource should remove all non-specified members when it manages\nan array of members or values.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/purge?view=dsc-3.0&preserve-view=true\n" + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_rebootRequested` property to\nreport whether the machine should be rebooted after the `set` method executes.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/rebootrequested?view=dsc-3.0&preserve-view=true\n" + } + }, + "defaultSnippets": [ + { + "label": " Define an instance property", + "markdownDescription": "Define a property for the resource instance schema.", + "body": { + "${1:propertyName}": { + "title": "${2:property title}", + "description": "${3:explanation of property purpose and usage}", + "type": "${4|string,integer,number,array,object,null|}" + } + } + } + ] + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must validate a JSON blob representing an instance of the DSC resource.\n\nThe JSON schema can be defined dynamically with the `command` property or statically with the\n`embedded` property.\n\nFor development purposes, it can be more convenient to use the `command` property and avoid\nneeding to adjust both the code and the schema.\n\nMicrosoft recommends using the `embedded` property when publishing a resource publicly. When the\nmanifest declares the schema with the `command` property, DSC calls the command at the beginning\nof any operation using the resource, possibly impacting performance. The schema is also\nunavailable to integrating tools when the resource isn't installed locally. When the schema is\nembedded in the manifest, DSC and integrating tools only need the manifest itself.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define as command without arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when no arguments are required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}" + } + } + }, + { + "label": " Define as command with arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when at least one argument is required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + }, + { + "label": " Define as an embedded schema", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema embedded in the manifest. This is the preferred option\nfor publicly published resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "body": { + "embedded": { + "${escape_dollar:$}schema": "${1|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${2:name}": { + "title": "${3:property title}", + "description": "${4:explanation of property purpose and usage}", + "type": "${5|string,integer,number,array,object,null|}" + } + } + } + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.1/config/document.json b/schemas/v3.0.1/config/document.json new file mode 100644 index 00000000..915198b9 --- /dev/null +++ b/schemas/v3.0.1/config/document.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "title": "DSC configuration document schema", + "description": "Describes a valid DSC configuration document.", + "type": "object", + "required": [ + "$schema", + "resources" + ], + "properties": { + "$schema": { + "title": "Schema", + "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json" + ] + }, + "parameters": { + "title": "DSC configuration document parameters", + "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", + "type": "object", + "additionalProperties": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json" + } + }, + "variables": { + "title": "Configuration variables", + "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", + "type": "object" + }, + "resources": { + "title": "DSC configuration document resources", + "description": "Defines a list of DSC resource instances for the configuration to manage.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json" + } + }, + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json" + } + } +} diff --git a/schemas/v3.0.1/config/document.metadata.json b/schemas/v3.0.1/config/document.metadata.json new file mode 100644 index 00000000..4bd5ad88 --- /dev/null +++ b/schemas/v3.0.1/config/document.metadata.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json", + "title": "Configuration metadata", + "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", + "type": "object", + "properties": { + "Microsoft.DSC": { + "type": "object", + "title": "DSC metadata", + "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", + "unevaluatedProperties": false, + "properties": { + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "default": "Current", + "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`." + } + } + } + } +} diff --git a/schemas/v3.0.1/config/document.parameter.json b/schemas/v3.0.1/config/document.parameter.json new file mode 100644 index 00000000..e629abe1 --- /dev/null +++ b/schemas/v3.0.1/config/document.parameter.json @@ -0,0 +1,228 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json", + "title": "Parameter", + "description": "Defines a runtime option for a DSC configuration document.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json" + }, + "defaultValue": { + "title": "Default value", + "description": "Defines the default value for the parameter.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json" + }, + "allowedValues": { + "title": "Allowed values", + "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json" + } + }, + "description": { + "title": "Parameter description", + "description": "Defines a synopsis for the parameter explaining its purpose.", + "type": "string" + }, + "metadata": { + "title": "Parameter metadata", + "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", + "type": "object" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "minValue": { + "title": "Minimum value", + "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", + "type": "integer" + }, + "maxValue": { + "title": "Maximum value", + "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", + "type": "integer" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + }, + { + "properties": { + "type": { + "const": "array" + } + } + } + ] + }, + "then": { + "properties": { + "minLength": { + "title": "Minimum length", + "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", + "type": "integer", + "minimum": 0 + }, + "maxLength": { + "title": "Maximum length", + "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", + "type": "integer", + "minimum": 0 + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "string" + }, + "allowedValues": { + "items": { + "type": "string" + } + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "object" + } + } + }, + { + "properties": { + "type": { + "const": "secureObject" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "object" + }, + "allowedValues": { + "items": { + "type": "object" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "integer" + }, + "allowedValues": { + "items": { + "type": "integer" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "allowedValues": { + "items": { + "type": "boolean" + } + } + } + } + } + ] +} diff --git a/schemas/v3.0.1/config/document.resource.json b/schemas/v3.0.1/config/document.resource.json new file mode 100644 index 00000000..c5979e73 --- /dev/null +++ b/schemas/v3.0.1/config/document.resource.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json", + "title": "DSC resource instance", + "description": "Defines an instance of a DSC resource in a configuration.", + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "dependsOn": { + "title": "Instance depends on", + "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$" + } + }, + "properties": { + "title": "Managed instance properties", + "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", + "type": "object" + } + } +} diff --git a/schemas/v3.0.1/definitions/commandArgs.json b/schemas/v3.0.1/definitions/commandArgs.json new file mode 100644 index 00000000..489d18c5 --- /dev/null +++ b/schemas/v3.0.1/definitions/commandArgs.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command." + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "type": "boolean", + "default": false + } + } + } + ] + } +} diff --git a/schemas/v3.0.1/definitions/commandExecutable.json b/schemas/v3.0.1/definitions/commandExecutable.json new file mode 100644 index 00000000..f397d189 --- /dev/null +++ b/schemas/v3.0.1/definitions/commandExecutable.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" +} diff --git a/schemas/v3.0.1/definitions/hadErrors.json b/schemas/v3.0.1/definitions/hadErrors.json new file mode 100644 index 00000000..d7a7df96 --- /dev/null +++ b/schemas/v3.0.1/definitions/hadErrors.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" +} diff --git a/schemas/v3.0.1/definitions/inputKind.json b/schemas/v3.0.1/definitions/inputKind.json new file mode 100644 index 00000000..ca809cf5 --- /dev/null +++ b/schemas/v3.0.1/definitions/inputKind.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ] +} diff --git a/schemas/v3.0.1/definitions/instanceName.json b/schemas/v3.0.1/definitions/instanceName.json new file mode 100644 index 00000000..0445b7e0 --- /dev/null +++ b/schemas/v3.0.1/definitions/instanceName.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 +} diff --git a/schemas/v3.0.1/definitions/message.json b/schemas/v3.0.1/definitions/message.json new file mode 100644 index 00000000..1b012985 --- /dev/null +++ b/schemas/v3.0.1/definitions/message.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } +} diff --git a/schemas/v3.0.1/definitions/messages.json b/schemas/v3.0.1/definitions/messages.json new file mode 100644 index 00000000..863d558e --- /dev/null +++ b/schemas/v3.0.1/definitions/messages.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json" + } +} diff --git a/schemas/v3.0.1/definitions/parameters/dataTypes.json b/schemas/v3.0.1/definitions/parameters/dataTypes.json new file mode 100644 index 00000000..0b06059f --- /dev/null +++ b/schemas/v3.0.1/definitions/parameters/dataTypes.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json", + "title": "Data Types", + "description": "Defines the data type for the parameter value.", + "type": "string", + "enum": [ + "string", + "secureString", + "int", + "bool", + "object", + "secureObject", + "array" + ] +} diff --git a/schemas/v3.0.1/definitions/parameters/validValueTypes.json b/schemas/v3.0.1/definitions/parameters/validValueTypes.json new file mode 100644 index 00000000..202c8059 --- /dev/null +++ b/schemas/v3.0.1/definitions/parameters/validValueTypes.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json", + "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", + "type": [ + "string", + "integer", + "object", + "array", + "boolean" + ] +} diff --git a/schemas/v3.0.1/definitions/resourceCapabilities.json b/schemas/v3.0.1/definitions/resourceCapabilities.json new file mode 100644 index 00000000..66013b6f --- /dev/null +++ b/schemas/v3.0.1/definitions/resourceCapabilities.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json", + "title": "Resource capabilities", + "description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "set", + "setHandlesExist", + "whatIf", + "test", + "delete", + "export", + "resolve" + ] + } +} diff --git a/schemas/v3.0.1/definitions/resourceKind.json b/schemas/v3.0.1/definitions/resourceKind.json new file mode 100644 index 00000000..598d8993 --- /dev/null +++ b/schemas/v3.0.1/definitions/resourceKind.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ] +} diff --git a/schemas/v3.0.1/definitions/resourceType.json b/schemas/v3.0.1/definitions/resourceType.json new file mode 100644 index 00000000..f02ea693 --- /dev/null +++ b/schemas/v3.0.1/definitions/resourceType.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" +} diff --git a/schemas/v3.0.1/definitions/returnKind.json b/schemas/v3.0.1/definitions/returnKind.json new file mode 100644 index 00000000..d8c02053 --- /dev/null +++ b/schemas/v3.0.1/definitions/returnKind.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." +} diff --git a/schemas/v3.0.1/definitions/semver.json b/schemas/v3.0.1/definitions/semver.json new file mode 100644 index 00000000..95046091 --- /dev/null +++ b/schemas/v3.0.1/definitions/semver.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/context.json b/schemas/v3.0.1/metadata/Microsoft.DSC/context.json new file mode 100644 index 00000000..00b65cfb --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/context.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/context.json", + "title": "Operation context", + "description": "Defines whether the operation was for a configuration or a resource. If the value for this metadata property is `configuration`, DSC was run through the `dsc config` command. If the value is `resource`, DSC was run with the `dsc resource` command.", + "type": "string", + "enum": [ + "resource", + "configuration" + ] +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json b/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json new file mode 100644 index 00000000..028fcca1 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json b/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json new file mode 100644 index 00000000..b9339065 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json b/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json new file mode 100644 index 00000000..683b2511 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json b/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json new file mode 100644 index 00000000..c301e458 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json b/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json new file mode 100644 index 00000000..55ac2b79 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json b/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json new file mode 100644 index 00000000..dba50729 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" +} diff --git a/schemas/v3.0.1/metadata/Microsoft.DSC/version.json b/schemas/v3.0.1/metadata/Microsoft.DSC/version.json new file mode 100644 index 00000000..b3985b81 --- /dev/null +++ b/schemas/v3.0.1/metadata/Microsoft.DSC/version.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" +} diff --git a/schemas/v3.0.1/metadata/configurationDocumentResult.json b/schemas/v3.0.1/metadata/configurationDocumentResult.json new file mode 100644 index 00000000..f7e939fd --- /dev/null +++ b/schemas/v3.0.1/metadata/configurationDocumentResult.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } +} diff --git a/schemas/v3.0.1/metadata/resourceInstanceResult.json b/schemas/v3.0.1/metadata/resourceInstanceResult.json new file mode 100644 index 00000000..a57dfea4 --- /dev/null +++ b/schemas/v3.0.1/metadata/resourceInstanceResult.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json" + } + } + } + } +} diff --git a/schemas/v3.0.1/outputs/config/get.json b/schemas/v3.0.1/outputs/config/get.json new file mode 100644 index 00000000..50ce6197 --- /dev/null +++ b/schemas/v3.0.1/outputs/config/get.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/get.json", + "title": "Result for `dsc config get` command", + "description": "Represents the data structure returned by the `dsc config get` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `get` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/config/set.json b/schemas/v3.0.1/outputs/config/set.json new file mode 100644 index 00000000..8535407e --- /dev/null +++ b/schemas/v3.0.1/outputs/config/set.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/set.json", + "title": "Result for `dsc config set` command", + "description": "Represents the data structure returned by the `dsc config set` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `set` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/config/test.json b/schemas/v3.0.1/outputs/config/test.json new file mode 100644 index 00000000..f07212f7 --- /dev/null +++ b/schemas/v3.0.1/outputs/config/test.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/test.json", + "title": "Result for `dsc config test` command", + "description": "Represents the data structure returned by the `dsc config test` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `test` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/get.full.json b/schemas/v3.0.1/outputs/resource/get.full.json new file mode 100644 index 00000000..5b87998c --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/get.full.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/get.json b/schemas/v3.0.1/outputs/resource/get.json new file mode 100644 index 00000000..a5808929 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/get.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json" + } + } + ] +} diff --git a/schemas/v3.0.1/outputs/resource/get.simple.json b/schemas/v3.0.1/outputs/resource/get.simple.json new file mode 100644 index 00000000..0747c7e7 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/get.simple.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/list.json b/schemas/v3.0.1/outputs/resource/list.json new file mode 100644 index 00000000..aabdcec6 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/list.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/list.json", + "title": "dsc resource list result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource list` command.", + "type": "object", + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "capabilities": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json" + }, + "description": { + "title": "Resource description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the DSC resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the DSC resource on the file system.", + "type": "string" + }, + "implementedAs": { + "title": "Implemented as", + "description": "Indicates how the DSC resource was implemented.", + "oneOf": [ + { + "title": "Standard implementation", + "description": "Indicates that the DSC resource is implemented as one of the standard implementations built into DSC.", + "type": "string", + "enum": [ + "command" + ] + }, + { + "title": "Custom implementation", + "description": "Indicates that the DSC resource uses a custom implementation. Only adapted resources define this value.", + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "title": "Custom implementation name", + "description": "The name of the custom implementation. This name is determined by the resource adapter.", + "type": "string" + } + } + } + ] + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the DSC resource.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "title": "Properties", + "description": "Defines the DSC resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required DSC resource adapter", + "description": "Defines the fully qualified type name of the DSC resource adapter the DSC resource depends on.", + "oneOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + { + "type": "null" + } + ] + }, + "manifest": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/schema.json b/schemas/v3.0.1/outputs/resource/schema.json new file mode 100644 index 00000000..b10abed1 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.", + "type": "object" +} diff --git a/schemas/v3.0.1/outputs/resource/set.full.json b/schemas/v3.0.1/outputs/resource/set.full.json new file mode 100644 index 00000000..4413709d --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/set.full.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/set.json b/schemas/v3.0.1/outputs/resource/set.json new file mode 100644 index 00000000..07db4f73 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/set.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json" + } + } + ] +} diff --git a/schemas/v3.0.1/outputs/resource/set.simple.json b/schemas/v3.0.1/outputs/resource/set.simple.json new file mode 100644 index 00000000..b6579fe0 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/set.simple.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/test.full.json b/schemas/v3.0.1/outputs/resource/test.full.json new file mode 100644 index 00000000..38de4da7 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/test.full.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json" + } + } +} diff --git a/schemas/v3.0.1/outputs/resource/test.json b/schemas/v3.0.1/outputs/resource/test.json new file mode 100644 index 00000000..3d41195c --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/test.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json" + } + } + ] +} diff --git a/schemas/v3.0.1/outputs/resource/test.simple.json b/schemas/v3.0.1/outputs/resource/test.simple.json new file mode 100644 index 00000000..8238ea34 --- /dev/null +++ b/schemas/v3.0.1/outputs/resource/test.simple.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } +} diff --git a/schemas/v3.0.1/outputs/schema.json b/schemas/v3.0.1/outputs/schema.json new file mode 100644 index 00000000..deaa9535 --- /dev/null +++ b/schemas/v3.0.1/outputs/schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.", + "type": "object" +} diff --git a/schemas/v3.0.1/resource/manifest.adapter.json b/schemas/v3.0.1/resource/manifest.adapter.json new file mode 100644 index 00000000..b1e8830d --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.adapter.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources." + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.delete.json b/schemas/v3.0.1/resource/manifest.delete.json new file mode 100644 index 00000000..ed36957c --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.delete.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.export.json b/schemas/v3.0.1/resource/manifest.export.json new file mode 100644 index 00000000..f181135f --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.export.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.get.json b/schemas/v3.0.1/resource/manifest.get.json new file mode 100644 index 00000000..bb477566 --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.get.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.json b/schemas/v3.0.1/resource/manifest.json new file mode 100644 index 00000000..b371eaab --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json" + ] + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "get": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.get.json" + }, + "set": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json" + }, + "delete": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.delete.json" + }, + "export": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.export.json" + }, + "validate": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ] + }, + "schema": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.resolve.json b/schemas/v3.0.1/resource/manifest.resolve.json new file mode 100644 index 00000000..95837aae --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.resolve.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.schema.json b/schemas/v3.0.1/resource/manifest.schema.json new file mode 100644 index 00000000..976504a7 --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.schema.json @@ -0,0 +1,195 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource." + } + } + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": {}, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json" + } + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json" + } + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json" + } + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json" + } + } + } + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.set.json b/schemas/v3.0.1/resource/manifest.set.json new file mode 100644 index 00000000..dccbaed0 --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.set.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.test.json b/schemas/v3.0.1/resource/manifest.test.json new file mode 100644 index 00000000..b18bfa45 --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.test.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json", + "default": "state" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.validate.json b/schemas/v3.0.1/resource/manifest.validate.json new file mode 100644 index 00000000..bb3ecf18 --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.validate.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/manifest.whatIf.json b/schemas/v3.0.1/resource/manifest.whatIf.json new file mode 100644 index 00000000..29c3159c --- /dev/null +++ b/schemas/v3.0.1/resource/manifest.whatIf.json @@ -0,0 +1,84 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.1/resource/properties/exist.json b/schemas/v3.0.1/resource/properties/exist.json new file mode 100644 index 00000000..c2e48ac2 --- /dev/null +++ b/schemas/v3.0.1/resource/properties/exist.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json", + "title": "Instance should exist", + "description": "Indicates whether the DSC resource instance should exist.", + "type": "boolean", + "default": true, + "enum": [ + false, + true + ] +} diff --git a/schemas/v3.0.1/resource/properties/inDesiredState.json b/schemas/v3.0.1/resource/properties/inDesiredState.json new file mode 100644 index 00000000..b1ae60ba --- /dev/null +++ b/schemas/v3.0.1/resource/properties/inDesiredState.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json", + "title": "Instance is in the Desired State", + "description": "Indicates whether the instance is in the desired state. This property is only returned by the `test` method.", + "type": [ + "boolean", + "null" + ], + "readOnly": true +} diff --git a/schemas/v3.0.1/resource/properties/purge.json b/schemas/v3.0.1/resource/properties/purge.json new file mode 100644 index 00000000..cfc9d2b5 --- /dev/null +++ b/schemas/v3.0.1/resource/properties/purge.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json", + "title": "Purge", + "description": "Indicates that only the components described in the DSC resource should exist. If other components exist, the DSC resource is out of the desired state. When enforcing desired state, the DSC resource removes unmanaged components.", + "type": [ + "boolean", + "null" + ], + "writeOnly": true +} diff --git a/schemas/v3.0.1/resource/properties/rebootRequested.json b/schemas/v3.0.1/resource/properties/rebootRequested.json new file mode 100644 index 00000000..02c70f8d --- /dev/null +++ b/schemas/v3.0.1/resource/properties/rebootRequested.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json", + "title": "Reboot Requested", + "description": "Indicates that the set operation requires a reboot before it's fully complete.", + "type": [ + "boolean", + "null" + ], + "readOnly": true +} diff --git a/schemas/v3.0.1/resource/stdout/delete.json b/schemas/v3.0.1/resource/stdout/delete.json new file mode 100644 index 00000000..4845f241 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/delete.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/delete.json", + "title": "Delete resource operation stdout", + "description": "DSC does not expect the **Delete** operation for a resource to return any JSON to stdout.", + "type": "null" +} diff --git a/schemas/v3.0.1/resource/stdout/export.json b/schemas/v3.0.1/resource/stdout/export.json new file mode 100644 index 00000000..6b8aaf63 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/export.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/export.json", + "title": "Export resource operation stdout", + "description": "Represents the actual state of a resource instance in DSC. DSC expects every JSON Line emitted to stdout for the **Export** operation to adhere to this schema.", + "type": "object" +} diff --git a/schemas/v3.0.1/resource/stdout/get.json b/schemas/v3.0.1/resource/stdout/get.json new file mode 100644 index 00000000..e955517f --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/get.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/get.json", + "title": "Get resource operation stdout", + "description": "Represents the actual state of a resource instance in DSC. DSC expects the JSON Line emitted to stdout for the **Get** operation to adhere to this schema.", + "type": "object" +} diff --git a/schemas/v3.0.1/resource/stdout/list.json b/schemas/v3.0.1/resource/stdout/list.json new file mode 100644 index 00000000..e03abc23 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/list.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/list.json", + "title": "List resource operation stdout", + "description": "Defines the representation of an adapted resource in DSC. DSC expects every JSON Line emitted to stdout for the **List** operation to adhere to this schema.", + "type": "object", + "required": [ + "type", + "kind", + "version", + "capabilities", + "path", + "directory", + "implementedAs", + "properties", + "requireAdapter" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json" + }, + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json" + }, + "capabilities": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the adapted resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the adapted resource on the file system." + }, + "implementedAs": { + "title": "Custom implementation name", + "description": "Indicates that the adapted resource uses a custom implementation. The name can be used to distinguish between different implementations for the adapted resources.", + "type": "string" + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the adapted Resource.", + "type": [ + "string", + "null" + ], + "pattern": "^\\w+( \\w+)*" + }, + "properties": { + "title": "Properties", + "description": "Defines the adapted resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required adapter", + "description": "Defines the fully qualified type name of the adapter that the adapted resource depends on. An adapter should always set this value to its own fully qualified resource type name.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json" + } + } +} diff --git a/schemas/v3.0.1/resource/stdout/resolve.json b/schemas/v3.0.1/resource/stdout/resolve.json new file mode 100644 index 00000000..8841beea --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/resolve.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/resolve.json", + "title": "Resolve resource operation stdout", + "description": "Defines the representation of a resolved configuration document. DSC expects the JSON Line emitted to stdout for the **Resolve** operation to adhere to this schema.", + "type": "object", + "required": [ + "configuration" + ], + "properties": { + "configuration": { + "title": "Resolved configuration document", + "description": "Defines the resolved configuration document.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.json" + }, + "parameters": { + "title": "Resolved parameters", + "description": "The `parameters` property defines the set of resolved parameter values for the resolved configuration document.", + "type": "object" + } + } +} diff --git a/schemas/v3.0.1/resource/stdout/schema.json b/schemas/v3.0.1/resource/stdout/schema.json new file mode 100644 index 00000000..d2636835 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/schema.json", + "title": "Schema resource command stdout", + "description": "Represents the JSON Schema that validates instances of the resource. DSC expects a resource that defines the `schema.command` field in its resource manifest to return this value for that command.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ] +} diff --git a/schemas/v3.0.1/resource/stdout/set.json b/schemas/v3.0.1/resource/stdout/set.json new file mode 100644 index 00000000..cdac88f1 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/set.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/set.json", + "title": "Set resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Set** operation.", + "oneOf": [ + { + "title": "Null output", + "description": "When a command resource doesn't define `set.return` in its resource manifest, DSC doesn't expect the resource to emit any JSON to stdout for the **Set** operation.", + "type": "null" + }, + { + "title": "state output", + "description": "When a resource defines `set.return` in its manifest as `state` or `stateAndDiff`, DSC expects the resource to emit a JSON Line to stdout representing the actual state of the resource instance after the **Set** operation changes the system.", + "type": "object" + }, + { + "title": "diff output", + "description": "When a command resource defines `set.return` in its manifest as `stateAndDiff`, DSC expects the resource to emit a second JSON Line to stdout representing the names of the resource properties that the operation changed on the system.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + ] +} diff --git a/schemas/v3.0.1/resource/stdout/test.json b/schemas/v3.0.1/resource/stdout/test.json new file mode 100644 index 00000000..bf17629b --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/test.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/test.json", + "title": "Test resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Test** operation.", + "oneOf": [ + { + "title": "state output", + "description": "For the **Test** operation, DSC always expects the resource to emit a JSON Line to stdout representing the actual state of the resource instance with the `_inDesiredState` canonical resource property included in the returned object.", + "type": "object" + }, + { + "title": "diff output", + "description": "When a command resource defines `test.return` in its manifest as `stateAndDiff`, DSC expects the resource to emit a second JSON Line to stdout representing the names of the resource properties that the operation changed on the system.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + ] +} diff --git a/schemas/v3.0.1/resource/stdout/validate.json b/schemas/v3.0.1/resource/stdout/validate.json new file mode 100644 index 00000000..3832b0c2 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/validate.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/validate.json", + "title": "Validate resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Validate** operation.", + "type": "object", + "required": [ + "valid" + ], + "properties": { + "valid": { + "title": "Instance validity", + "description": "Indicates whether the instance is valid for the resource." + }, + "reason": { + "title": "Reason instance is invalid", + "description": "Describes how and why the instance is invalid for the resource." + } + } +} diff --git a/schemas/v3.0.1/resource/stdout/whatIf.json b/schemas/v3.0.1/resource/stdout/whatIf.json new file mode 100644 index 00000000..a5891872 --- /dev/null +++ b/schemas/v3.0.1/resource/stdout/whatIf.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/stdout/whatIf.json", + "title": "Set (what-if mode) resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Set** operation in what-if mode.", + "oneOf": [ + { + "title": "state output", + "description": "When a resource defines `whatIf.return` in its manifest as `state` or `stateAndDiff`, DSC expects the resource to emit a JSON Line to stdout representing the predicted actual state of the resource instance after the **Set** operation changes the system.", + "type": "object" + }, + { + "title": "diff output", + "description": "When a command resource defines `whatIf.return` in its manifest as `stateAndDiff`, DSC expects the resource to emit a second JSON Line to stdout representing the names of the resource properties that the operation changed on the system.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + ] +} diff --git a/schemas/v3.0.2/bundled/config/document.json b/schemas/v3.0.2/bundled/config/document.json new file mode 100644 index 00000000..17af6ea4 --- /dev/null +++ b/schemas/v3.0.2/bundled/config/document.json @@ -0,0 +1,419 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "title": "DSC configuration document schema", + "description": "Describes a valid DSC configuration document.", + "type": "object", + "required": [ + "$schema", + "resources" + ], + "properties": { + "$schema": { + "title": "Schema", + "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" + ] + }, + "parameters": { + "title": "DSC configuration document parameters", + "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", + "type": "object", + "additionalProperties": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json" + } + }, + "variables": { + "title": "Configuration variables", + "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", + "type": "object" + }, + "resources": { + "title": "DSC configuration document resources", + "description": "Defines a list of DSC resource instances for the configuration to manage.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + } + }, + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json", + "title": "Parameter", + "description": "Defines a runtime option for a DSC configuration document.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json" + }, + "defaultValue": { + "title": "Default value", + "description": "Defines the default value for the parameter.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json" + }, + "allowedValues": { + "title": "Allowed values", + "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json" + } + }, + "description": { + "title": "Parameter description", + "description": "Defines a synopsis for the parameter explaining its purpose.", + "type": "string" + }, + "metadata": { + "title": "Parameter metadata", + "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", + "type": "object" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "minValue": { + "title": "Minimum value", + "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", + "type": "integer" + }, + "maxValue": { + "title": "Maximum value", + "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", + "type": "integer" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + }, + { + "properties": { + "type": { + "const": "array" + } + } + } + ] + }, + "then": { + "properties": { + "minLength": { + "title": "Minimum length", + "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", + "type": "integer", + "minimum": 0 + }, + "maxLength": { + "title": "Maximum length", + "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", + "type": "integer", + "minimum": 0 + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "string" + }, + "allowedValues": { + "items": { + "type": "string" + } + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "object" + } + } + }, + { + "properties": { + "type": { + "const": "secureObject" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "object" + }, + "allowedValues": { + "items": { + "type": "object" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "integer" + }, + "allowedValues": { + "items": { + "type": "integer" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "allowedValues": { + "items": { + "type": "boolean" + } + } + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json", + "title": "DSC resource instance", + "description": "Defines an instance of a DSC resource in a configuration.", + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "dependsOn": { + "title": "Instance depends on", + "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$" + } + }, + "properties": { + "title": "Managed instance properties", + "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", + "type": "object" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json", + "title": "Configuration metadata", + "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", + "type": "object", + "properties": { + "Microsoft.DSC": { + "type": "object", + "title": "DSC metadata", + "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", + "unevaluatedProperties": false, + "properties": { + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "default": "Current", + "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`." + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json", + "title": "Data Types", + "description": "Defines the data type for the parameter value.", + "type": "string", + "enum": [ + "string", + "secureString", + "int", + "bool", + "object", + "secureObject", + "array" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json", + "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", + "type": [ + "string", + "integer", + "object", + "array", + "boolean" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + } +} diff --git a/schemas/v3.0.2/bundled/config/document.vscode.json b/schemas/v3.0.2/bundled/config/document.vscode.json new file mode 100644 index 00000000..0340c324 --- /dev/null +++ b/schemas/v3.0.2/bundled/config/document.vscode.json @@ -0,0 +1,659 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "title": "DSC configuration document schema", + "description": "Describes a valid DSC configuration document.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDescribes a valid DSC configuration document.\n\nDSC configurations enable users to define state by combining different DSC resources. A\nconfiguration document uses parameters and variables to pass to a set of one or more resources\nthat define a desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "$schema", + "resources" + ], + "properties": { + "$schema": { + "title": "Schema", + "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" + ], + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the URI that resolves to the version of this schema that the\ndocument adheres to. DSC uses this property when validating and processing the configuration\ndocument.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../config/document.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n \n```yaml\n.../bundled/config/document.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/config/document.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\n> #### `v3` non-bundled\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + ] + }, + "parameters": { + "title": "DSC configuration document parameters", + "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines runtime options for the configuration. Users and integrating tools can override use\nthe defined parameters to pass alternate values to the configuration.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#parameters\n", + "defaultSnippets": [ + { + "label": " New Parameter", + "markdownDescription": "Defines a new runtime option for the configuration.\n\n```yaml\nparameterId:\n type: \n description: \n defaultValue: \n allowedValues:\n - \n```", + "body": { + "${1:parameterId}": { + "type": "$2", + "description": "$3", + "defaultValue": "$4", + "allowedValues": [ + "$5" + ] + } + } + }, + { + "label": " New Integer Parameter", + "markdownDescription": "Defines a new runtime option for the configuration as an integer value.\n\n```yaml\nparameterId:\n type: int\n description: \n defaultValue: \n minValue: \n minValue: \n```", + "body": { + "${1:parameterId}": { + "type": "int", + "description": "$2", + "defaultValue": "$3", + "minValue": "$4", + "maxValue": "$5" + } + } + } + ] + }, + "variables": { + "title": "Configuration variables", + "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", + "type": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of reusable values for the configuration document. The names of this value's\nproperties are the strings used to reference a variable's value.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#variables\n", + "defaultSnippets": [ + { + "label": " New variable property", + "markdownDescription": "Defines a new variable as a key-value pair.\n\n```yaml\nvariableName: variableValue\n```", + "body": { + "${1:variableName}": "${2:variableValue}" + } + }, + { + "label": " New variable property (object)", + "markdownDescription": "Defines a new key-value pair for the variables where the value is an object.\n\n```yaml\nvariableName:\n key: value\n```", + "body": { + "${1:variableName}": { + "${2:key}": "${3:value}" + } + } + }, + { + "label": " New variable property (array)", + "markdownDescription": "Defines a new key-value pair for the variables where the value is an array.\n\n```yaml\nvariableName:\n - firstValue\n - secondValue\n```", + "body": { + "${1:variableName}": [ + "${2:firstValue}", + "${3:secondValue}" + ] + } + } + ] + }, + "resources": { + "title": "DSC configuration document resources", + "description": "Defines a list of DSC resource instances for the configuration to manage.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of DSC resource instances for the configuration to manage.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#resources\n" + }, + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "config": { + "document.parameter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json", + "title": "Parameter", + "description": "Defines a runtime option for a DSC configuration document.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a runtime option for a DSC configuration document.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json" + }, + "defaultValue": { + "title": "Default value", + "description": "Defines the default value for the parameter.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the default value for the parameter.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#allowedvalues\n" + }, + "allowedValues": { + "title": "Allowed values", + "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of valid values for the parameter. If the parameter is defined with any other\nvalues, it's invalid.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#allowedvalues\n" + }, + "description": { + "title": "Parameter description", + "description": "Defines a synopsis for the parameter explaining its purpose.", + "type": "string", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a synopsis for the parameter explaining its purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#description-1\n" + }, + "metadata": { + "title": "Parameter metadata", + "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", + "type": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of key-value pairs for the parameter. This metadata isn't validated.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#metadata-1\n", + "defaultSnippets": [ + { + "label": " New metadata property", + "markdownDescription": "Defines a key-value pair for the metadata:\n\n```yaml\nmetadataName: value\n```", + "body": { + "${1:metadataName}": "${2:value}" + } + }, + { + "label": " New metadata property (object)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an object.\n\n```yaml\nmetadataName:\n key: value\n```", + "body": { + "${1:metadataName}": { + "${2:key}": "${3:value}" + } + } + }, + { + "label": " New metadata property (array)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an array.\n\n```yaml\nmetadataName:\n - firstValue\n - secondValue\n```", + "body": { + "${1:metadataName}": [ + "${2:firstValue}", + "${3:secondValue}" + ] + } + } + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "minValue": { + "title": "Minimum value", + "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", + "type": "integer", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid value for an integer type. If defined with the `maxValue` property,\nthis value must be less than the value of `maxValue`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minvalue\n" + }, + "maxValue": { + "title": "Maximum value", + "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", + "type": "integer", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid value for an integer type. If defined with the `minValue` property,\nthis value must be greater than the value of `minValue`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxvalue\n" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + }, + { + "properties": { + "type": { + "const": "array" + } + } + } + ] + }, + "then": { + "properties": { + "minLength": { + "title": "Minimum length", + "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", + "type": "integer", + "minimum": 0, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `maxLength` property, this value must be less than the value of `maxLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minLength\n" + }, + "maxLength": { + "title": "Maximum length", + "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", + "type": "integer", + "minimum": 0, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `minLength` property, this value must be less than the value of `minLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxLength\n" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "string" + }, + "allowedValues": { + "items": { + "type": "string" + } + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "object" + } + } + }, + { + "properties": { + "type": { + "const": "secureObject" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "object" + }, + "allowedValues": { + "items": { + "type": "object" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "integer" + }, + "allowedValues": { + "items": { + "type": "integer" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "allowedValues": { + "items": { + "type": "boolean" + } + } + } + } + } + ] + }, + "document.resource.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json", + "title": "DSC resource instance", + "description": "Defines an instance of a DSC resource in a configuration.", + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "dependsOn": { + "title": "Instance depends on", + "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$", + "patternErrorMessage": "Invalid value, must be a value like `[resourceId('', '`)], such as\n`[resourceId('Microsoft/OSInfo', 'Foo')]`.\n\nThe `` and `` should be the fully qualified type of the resource and its\nfriendly name in the configuration.\n", + "defaultSnippets": [ + { + "label": " New dependency", + "markdownDescription": "Defines a new dependency for the resource instance.\n\n```yaml\n\"[resourceId('dependencyInstance/Type', 'dependencyInstanceName')]\"\n```", + "bodyText": "\"[resourceId('${3:dependencyInstance/Type}', '${4:dependencyInstanceName}')]\"" + } + ] + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of DSC resource instances that DSC must successfully process before processing\nthis instance. Each value for this property must be the `resourceID()` lookup for another\ninstance in the configuration. Multiple instances can depend on the same instance, but every\ndependency for an instance must be unique in that instance's `dependsOn` property.\n\nThe `resourceID()` function uses this syntax:\n\n```yaml\n\"[resourceId('', '']\"\n```\n\nThe `` value is the `type` property of the dependent resource and\n`` is the dependency's `name` property. When adding a dependency in a\nYAML-format configuration document, always wrap the `resourceID()` lookup in double quotes\n(`\"`).\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#properties-1\n" + }, + "properties": { + "title": "Managed instance properties", + "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", + "type": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties of the DSC resource this instance manages. This property's value must\nbe an object. DSC validates the property's value against the DSC resource's schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#properties-1\n" + } + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an instance of a DSC resource in a configuration.\n\nThe `resources` property of a DSC configuration document always includes at least one DSC resource\ninstance. Together, the instances in a configuration define the desired state that DSC can get,\ntest, and set on a machine.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " New resource instance", + "markdownDescription": "Defines a new instance of a DSC resource for the configuration.\n\n```yaml\ntype: owner[.group][.area]/name\nname: instance_name\nproperties:\n propertyName: propertyValue\n```", + "body": { + "type": "${1:owner[.group][.area]/name}", + "name": "${2:instance_name}", + "properties": { + "${3:propertyName}": "${4:propertyValue}" + } + } + }, + { + "label": " New dependent resource instance", + "markdownDescription": "Defines a new instance of a DSC resource for the configuration that depends on another\ninstance.\n\n```yaml\ntype: owner[.group][.area]/name\nname: instance_name\ndependsOn:\n - \"[resourceId('dependencyInstance/Type', 'dependencyInstanceName')]\"\nproperties:\n propertyName: propertyValue\n```", + "body": { + "type": "${1:owner[.group][.area]/name}", + "name": "${2:instance_name}", + "dependsOn": [ + "\"[resourceId('${3:dependencyInstance/Type}', '${4:dependencyInstanceName}')]\"" + ], + "properties": { + "${5:propertyName}": "${6:propertyValue}" + } + } + } + ] + }, + "document.metadata.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json", + "title": "Configuration metadata", + "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", + "type": "object", + "properties": { + "Microsoft.DSC": { + "type": "object", + "title": "DSC metadata", + "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe `Microsoft.DSC` metadata property contains directives and information that DSC itself\nuses when processing a configuration document. Unlike other metadata key-value pairs, DSC\nvalidates these properties.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", + "unevaluatedProperties": false, + "properties": { + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "default": "Current", + "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines the security context a configuration requires. If you invoke a DSC\noperation against the configuration document in a security context that conflicts with\nthis metadata, DSC raises an error when it validates the configuration document.\n\nThe default security context is `Current`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", + "markdownEnumDescriptions": [ + "\n\n> ### Current security context\n>\n> Indicates that the configuration document is usable under any security context. You\n> can invoke DSC operations against the document when elevated as root or an\n> administrator and as a normal user or account.\n", + "\n\n> ### Elevated security context\n>\n> Indicates that the configuration document is usable only in an elevated security\n> context. You can invoke DSC operations against the document when elevated as root or\n> an administrator. When you invoke DSC operations against the document as a\n> non-elevated user or account, DSC raises an error when it validates the configuration\n> document.\n", + "\n\n> ### Restricted security context\n>\n> Indicates that the configuration document is usable only in a non-elevated security\n> context. You can invoke DSC operations against the document as a non-elevated user or\n> account. When you invoke DSC operations against the document as root or an\n> administrator, DSC raises an error when it validates the configuration document.\n" + ] + } + } + } + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC`\nproperty, this metadata isn't validated. You can pass any data into this property of a\nconfiguration document.\n\nThe `Microsoft.DSC` metadata property contains metadata directives and information that DSC\nitself uses when processing the configuration document. For more information, see\n[Microsoft.DSC][02]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", + "defaultSnippets": [ + { + "label": " New metadata property", + "markdownDescription": "Defines a key-value pair for the metadata:\n\n```yaml\nmetadataName: value\n```", + "body": { + "${1:metadataName}": "${2:value}" + } + }, + { + "label": " New metadata property (object)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an object.\n\n```yaml\nmetadataName:\n key: value\n```", + "body": { + "${1:metadataName}": { + "${2:key}": "${3:value}" + } + } + }, + { + "label": " New metadata property (array)", + "markdownDescription": "Defines a new key-value pair for the metadata where the value is an array.\n\n```yaml\nmetadataName:\n - firstValue\n - secondValue\n```", + "body": { + "${1:metadataName}": [ + "${2:firstValue}", + "${3:secondValue}" + ] + } + } + ] + } + }, + "definitions": { + "parameters": { + "dataTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json", + "title": "Data Types", + "description": "Defines the data type for the parameter value.", + "type": "string", + "enum": [ + "string", + "secureString", + "int", + "bool", + "object", + "secureObject", + "array" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the data type for the parameter value.\n\nThe valid data types for a parameter are:\n\n- `array` for arrays\n- `bool` for booleans\n- `int` for integers\n- `object` for objects\n- `string` for strings\n- `secureObject` for secure objects\n- `secureString` for secure strings\n\nAccess parameters in a configuration using this syntax:\n\n```yaml\n\"[parameter('')]\"\n```\n\nIn YAML, the parameter syntax needs to be enclosed in double-quotes when used as an inline value.\nIf the syntax isn't quoted, YAML interprets the syntax as an array.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "_Strings are an arbitrary set of text._\n\n> To define a long strings in YAML, use the folded block syntax or literal block syntax by\n> adding a `>` or `|` and a line break after the key. Then, indent the next line. Every line\n> in the string must start at the same level of indentation. You can trim the trailing\n> whitespace by using `>-` or `|-` instead.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#strings\n", + "_Secure strings are text that needs to be handled securely._\n\n> Secure strings are an arbitrary set of text that DSC and integrating tools shouldn't log or\n> record. If a secure data type parameter is used for a resource instance property that doesn't\n> expect a secure value, the resource may still log or record the value. If the resource has\n> independent logging or recording that isn't handled by DSC, the value may be stored\n> insecurely.\n>\n> Use secure strings for passwords and secrets. Never define a default value for secure string\n> parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n", + "_Integer values are numbers without a fractional part._\n\n> Integer values may be limited by integrating tools or the DSC resources they're used with.\n> DSC itself supports integer values between `-9223372036854775808` and `9223372036854775807`.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#integers\n", + "_Boolean values are either `true` or `false`._\n\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#booleans\n", + "_Objects define a set of key-value pairs._\n\n> The value for each key can be any valid data type. The values can be the same type or\n> different types.\n>\n> Access keys in the object using dot-notation. Dot-notation uses this syntax:\n>\n> ```yaml\n> \"[parameters('').]\n> ```\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#objects\n", + "_Secure objects are key-value pairs that need to be handled securely._\n\n> Secure objects define a set of key-value pairs that DSC and integrating tools shouldn't log\n> or record. If a secure data type parameter is used for a resource instance property that\n> doesn't expect a secure value, the resource may still log or record the value. If the\n> resource has independent logging or recording that isn't handled by DSC, the value may be\n> stored insecurely.\n>\n> Never define a default value for secure object parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n", + "_Arrays are a list of one or more values._\n\n> The values in the array can be any valid data type. Values in the array can be the same type\n> or different types.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#arrays\n" + ] + }, + "validValueTypes.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json", + "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", + "type": [ + "string", + "integer", + "object", + "array", + "boolean" + ] + } + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + } + }, + "metadata": { + "Microsoft.DSC": { + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/config/get.json b/schemas/v3.0.2/bundled/outputs/config/get.json new file mode 100644 index 00000000..c5d1cf59 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/config/get.json @@ -0,0 +1,318 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/get.json", + "title": "Result for `dsc config get` command", + "description": "Represents the data structure returned by the `dsc config get` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `get` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.2/definitions/message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/config/get.vscode.json b/schemas/v3.0.2/bundled/outputs/config/get.vscode.json new file mode 100644 index 00000000..f8c5ec63 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/config/get.vscode.json @@ -0,0 +1,352 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/get.json", + "title": "Result for `dsc config get` command", + "description": "Represents the data structure returned by the `dsc config get` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `get` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + }, + "messages": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "metadata": { + "configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "Microsoft.DSC": { + "version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "markdownDescription": "Defines the version of DSC that ran the command. This value is always the semantic version of the\nDSC command, like `3.0.0-preview.7`.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "markdownDescription": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or\n`Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "markdownDescription": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf`\nmode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set`\noperations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the start date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the end date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + }, + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + } + }, + "outputs": { + "resource": { + "get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json" + } + } + }, + "get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + } + ] + }, + "get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + } + }, + "definitions": { + "messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } + }, + "hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/config/set.json b/schemas/v3.0.2/bundled/outputs/config/set.json new file mode 100644 index 00000000..daa6f19d --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/config/set.json @@ -0,0 +1,334 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/set.json", + "title": "Result for `dsc config set` command", + "description": "Represents the data structure returned by the `dsc config set` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `set` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.2/definitions/message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/config/set.vscode.json b/schemas/v3.0.2/bundled/outputs/config/set.vscode.json new file mode 100644 index 00000000..18e67e4d --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/config/set.vscode.json @@ -0,0 +1,368 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/set.json", + "title": "Result for `dsc config set` command", + "description": "Represents the data structure returned by the `dsc config set` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `set` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + }, + "messages": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "metadata": { + "configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "Microsoft.DSC": { + "version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "markdownDescription": "Defines the version of DSC that ran the command. This value is always the semantic version of the\nDSC command, like `3.0.0-preview.7`.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "markdownDescription": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or\n`Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "markdownDescription": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf`\nmode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set`\noperations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the start date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the end date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + }, + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + } + }, + "outputs": { + "resource": { + "set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json" + } + } + }, + "set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + } + ] + }, + "set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + } + } + }, + "definitions": { + "messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } + }, + "hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/config/test.json b/schemas/v3.0.2/bundled/outputs/config/test.json new file mode 100644 index 00000000..14985ddd --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/config/test.json @@ -0,0 +1,340 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/test.json", + "title": "Result for `dsc config test` command", + "description": "Represents the data structure returned by the `dsc config test` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `test` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.2/definitions/message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/config/test.vscode.json b/schemas/v3.0.2/bundled/outputs/config/test.vscode.json new file mode 100644 index 00000000..6c040b8c --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/config/test.vscode.json @@ -0,0 +1,374 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/test.json", + "title": "Result for `dsc config test` command", + "description": "Represents the data structure returned by the `dsc config test` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `test` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + }, + "messages": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "metadata": { + "configurationDocumentResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } + }, + "Microsoft.DSC": { + "version.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "markdownDescription": "Defines the version of DSC that ran the command. This value is always the semantic version of the\nDSC command, like `3.0.0-preview.7`.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "operation.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "markdownDescription": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or\n`Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] + }, + "executionType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "markdownDescription": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf`\nmode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set`\noperations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] + }, + "startDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the start date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "endDatetime.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "markdownDescription": "Defines the end date and time for the DSC operation as a timestamp following the format defined\nin [RFC3339, section 5.6 (see `date-time`)][01].\n\nFor example: `2024-04-14T08:49:51.395686600-07:00`\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.6", + "type": "string", + "format": "date-time" + }, + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + }, + "securityContext.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] + } + }, + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + } + }, + "outputs": { + "resource": { + "test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json" + } + } + }, + "test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + } + ] + }, + "test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + } + } + }, + "definitions": { + "messages.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } + }, + "hadErrors.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "message.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/get.json b/schemas/v3.0.2/bundled/outputs/resource/get.json new file mode 100644 index 00000000..0e10619a --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/get.json @@ -0,0 +1,113 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.2/outputs/resource/get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/get.vscode.json b/schemas/v3.0.2/bundled/outputs/resource/get.vscode.json new file mode 100644 index 00000000..774b3169 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/get.vscode.json @@ -0,0 +1,139 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "outputs": { + "resource": { + "get.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + }, + "get.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json" + } + } + } + } + }, + "metadata": { + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "Microsoft.DSC": { + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } + }, + "definitions": { + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/list.json b/schemas/v3.0.2/bundled/outputs/resource/list.json new file mode 100644 index 00000000..3ce6a4ae --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/list.json @@ -0,0 +1,1265 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/list.json", + "title": "dsc resource list result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource list` command.", + "type": "object", + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "capabilities": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json" + }, + "description": { + "title": "Resource description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the DSC resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the DSC resource on the file system.", + "type": "string" + }, + "implementedAs": { + "title": "Implemented as", + "description": "Indicates how the DSC resource was implemented.", + "oneOf": [ + { + "title": "Standard implementation", + "description": "Indicates that the DSC resource is implemented as one of the standard implementations built into DSC.", + "type": "string", + "enum": [ + "command" + ] + }, + { + "title": "Custom implementation", + "description": "Indicates that the DSC resource uses a custom implementation. Only adapted resources define this value.", + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "title": "Custom implementation name", + "description": "The name of the custom implementation. This name is determined by the resource adapter.", + "type": "string" + } + } + } + ] + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the DSC resource.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "title": "Properties", + "description": "Defines the DSC resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required DSC resource adapter", + "description": "Defines the fully qualified type name of the DSC resource adapter the DSC resource depends on.", + "oneOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + { + "type": "null" + } + ] + }, + "manifest": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json" + } + }, + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json", + "title": "Resource capabilities", + "description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "set", + "setHandlesExist", + "whatIf", + "test", + "delete", + "export", + "resolve" + ] + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" + ] + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "get": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json" + }, + "set": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json" + }, + "delete": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json" + }, + "export": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json" + }, + "validate": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ] + }, + "schema": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "default": "state" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources." + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource." + } + } + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": {}, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json" + } + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json" + } + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json" + } + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json" + } + } + } + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command." + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json", + "title": "Instance should exist", + "description": "Indicates whether the DSC resource instance should exist.", + "type": "boolean", + "default": true, + "enum": [ + false, + true + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json", + "title": "Instance is in the Desired State", + "description": "Indicates whether the instance is in the desired state. This property is only returned by the `test` method.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json", + "title": "Purge", + "description": "Indicates that only the components described in the DSC resource should exist. If other components exist, the DSC resource is out of the desired state. When enforcing desired state, the DSC resource removes unmanaged components.", + "type": [ + "boolean", + "null" + ], + "writeOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json", + "title": "Reboot Requested", + "description": "Indicates that the set operation requires a reboot before it's fully complete.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/list.vscode.json b/schemas/v3.0.2/bundled/outputs/resource/list.vscode.json new file mode 100644 index 00000000..b2a99290 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/list.vscode.json @@ -0,0 +1,2127 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/list.json", + "title": "dsc resource list result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource list` command.", + "type": "object", + "properties": { + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "kind": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "version": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "capabilities": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json" + }, + "description": { + "title": "Resource description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the DSC resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the DSC resource on the file system.", + "type": "string" + }, + "implementedAs": { + "title": "Implemented as", + "description": "Indicates how the DSC resource was implemented.", + "oneOf": [ + { + "title": "Standard implementation", + "description": "Indicates that the DSC resource is implemented as one of the standard implementations built into DSC.", + "type": "string", + "enum": [ + "command" + ] + }, + { + "title": "Custom implementation", + "description": "Indicates that the DSC resource uses a custom implementation. Only adapted resources define this value.", + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "title": "Custom implementation name", + "description": "The name of the custom implementation. This name is determined by the resource adapter.", + "type": "string" + } + } + } + ] + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the DSC resource.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "title": "Properties", + "description": "Defines the DSC resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required DSC resource adapter", + "description": "Defines the fully qualified type name of the DSC resource adapter the DSC resource depends on.", + "oneOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + { + "type": "null" + } + ] + }, + "manifest": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json" + } + }, + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "definitions": { + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should interpret the resource - as a typical resource, an adapter, a group, or an\nimporter. This property is required for group, exporter, and importer resources.\n\nDSC infers the default value for this property based on whether the [adapter][02] property is\ndefined in the manifest:\n\n- If the `adapter` property is defined in the manifest, the default `kind` is `adapter`.\n- If the `adapter` property is not defined in the manifest, the default `kind` is `resource`.\n\nFor more information about the different kinds of DSC resources, see [DSC resource kinds][01]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/kinds?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\nIndicates that the manifest is for a typical DSC command resource.\n", + "\n\nIndicates that the manifest is for a resource that enables the use of non-command resources\nwith DSC.\n", + "\n\nIndicates that the manifest is for a resource that processes an array of nested resource\ninstances.\n", + "\n\nIndicates that the manifest is for a resource that resolves an external source to DSC\nresource instances. DSC processes the resolved instances as nested instances for the importer\nresource.\n" + ] + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "resourceCapabilities.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json", + "title": "Resource capabilities", + "description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDSC resources always have at least one capability. Resource capabilities define the operations\nyou can invoke for a resource and how the resource behaves when invoked.\n\nFor more information about the operations you can invoke for a resource, see\n[DSC resource operations][01].\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true\n[00]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true", + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "set", + "setHandlesExist", + "whatIf", + "test", + "delete", + "export", + "resolve" + ], + "markdownEnumDescriptions": [ + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `get` capability supports retrieving the current state of an instance\nwith the [Get][01] operation.\n\nA command resource has this capability when its resource manifest defines the [get][02]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#get\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#get-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `set` capability supports enforcing the desired state of an instance with\nthe [Set][01] operation. Resources without this capability can't be used with the\n[dsc resource set][02] or [dsc config set][03] commands unless they're defined in a\n`Microsoft.DSC/Assertion` group as a nested instance.\n\nA command resource has this capability when its resource manifest defines the [set][04]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#set\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#set-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/set?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/cli/config/set?view=dsc-3.0&preserve-view=true\n[04]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `setHandlesExist` capability indicates that you can use the [Set][01]\noperation to delete an instance. Resources with this capability must have the [_exist][02]\ncanonical resource property. Resources that don't have the `_exist` property never have this\ncapability.\n\nWhen a resource has the `_exist` property but not the `setHandlesExist` capability:\n\n- If the resource has the `delete` capability, DSC invokes the [Delete][03] operation instead\n of **Set** when the desired state for an instance defines `_exist` as false.\n- If the resource doesn't have the `delete` capability, DSC raises an error during a **Set**\n operation when the desired state for an instance defines `_exist` as false.\n\nA command resource has this capability when its resource manifest defines the\n[set.handlesExist][04] subproperty as `true`.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#sethandlesexist\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operationsview=dsc-3.0&preserve-view=true#set-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/existview=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operationsview=dsc-3.0&preserve-view=true#delete-operation\n[04]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/setview=dsc-3.0&preserve-view=true#handlesexist", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `whatIf` capability indicates that you can use the [Set][01] operation in\nwhat-if mode to have the resource return explicit information about how it would modify state\nin an actual **Set** operation.\n\nWhen a resource doesn't have this capability, DSC synthesizes how the resource would change\nan instance by converting the **Test** result for the instance into a **Set** result. The\nsynthetic operation can't indicate potential issues or changes that can't be determined by\ncomparing the result of the **Test** operation against the resource's desired state. For\nexample, the credentials used to test a resource might be valid for that operation, but not\nhave permissions to actually modify the system state. Only a resource with this capability\ncan fully report whether and how the resource would change system state.\n\nA resource has this capability when it defines the [whatIf][02] property.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#whatif\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#set-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `test` capability indicates that it implements the [Test][01] operation\ndirectly. Resources with this capability must have the [_inDesiredState][02] canonical\nresource property. Resources that don't have the `_inDesiredState` property never have this\ncapability.\n\nWhen a resource doesn't have this capability, DSC uses a synthetic test for instances of the\nresource. DSC performs the synthetic test by:\n\n1. Invoking the **Get** operation on the resource to retrieve the actual state of the\n instance.\n1. Synthetically testing each property for the desired state of an instance against the\n actual state returned. The synthetic test uses strict, case-sensitive equivalence.\n1. If the desired state for a property and the actual state aren't the same, DSC marks the\n property as out of the desired state.\n1. If any properties are out of the desired state, DSC reports the entire instance as not\n being in the desired state.\n\nSynthetic testing can't account for all resource behaviors. For example, if a package\nresource allows users to define a version range for the package, the **Get** operation\nreturns the actual version of the package, like `1.2.3`. If the user specified the version\nrange `~1` (NPM syntax indicating the package should be latest released semantic version with\nmajor version `1`), DSC would compare the desired state `~1` against the actual state `1.2.3`\nand consider the package to be in the incorrect state, even if `1.2.3` is actually the latest\nrelease matching the version pin.\n\nAny resource that has properties which can't use a strict case-sensitive comparison check\nshould have this capability.\n\nA command resource has this capability when its resource manifest defines the [test][03]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#test\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#test-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/inDesiredState?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `delete` capability supports removing an instance with the [Delete][01]\noperation and the [dsc resource delete][02] command.\n\nThis capability isn't mutually exclusive with the `setHandlesExist` property. A resource can handle\nthe `_exist` property in **Set** operations and be called directly with `dsc resource delete` to\nremove an instance.\n\nFor resources with the `delete` capability and the [_exist][03] canonical resource property:\n\n- If the resource doesn't have the `setHandlesExist` capability, DSC invokes the **Delete**\n operation for the resource instead of **Set** when the desired state defines `_exist` as\n `false`.\n- If the resource does have the `setHandlesExist` capability, DSC invokes the **Set** operation for\n the resource when the desired state defines `_exist` as `false`.\n\nResources with the `delete` capability that don't have the `_exist` canonical resource property\nmust implement their **Set** operation to handle removing instances. DSC can't infer existence\nsemantics without the `_exist` property.\n\nA command resource has this capability when its resource manifest defines the [delete][04]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#delete\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operations?view=dsc-3.0&preserve-view=true#delete-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/delete?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n[04]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `export` capability supports enumerating every instance of the resource\nwith the [Export][01] operation.\n\nYou can use resources with this capability with the following commands:\n\n- [dsc config export][02] to return a configuration document representing the actual state\n for every instance of each resource defined in the input document.\n- [dsc resource export][03] to return a configuration document representing the actual state\n for every instance of the input resource.\n- `dsc resource get` with the [--all][04] option to return the actual state of every instance\n of the input resource.\n\nA command resource has this capability when its resource manifest defines the [export][05]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#export\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/operationsview=dsc-3.0&preserve-view=true#export-operation\n[02]: https://learn.microsoft.com/powershell/dsc/reference/cli/config/export?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/export?view=dsc-3.0&preserve-view=true\n[04]: https://learn.microsoft.com/powershell/dsc/reference/cli/resource/get?view=dsc-3.0&preserve-view=true#--all\n[05]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "***\n[_Online Documentation_][00]\n***\n\nA resource with the `resolve` capability supports resolving nested resource instances from an\nexternal source. This capability is primarily used by [importer resources][01] to enable users to\ncompose configuration documents.\n\nA command resource has this capability when its resource manifest defines the [resolve][0220]\nproperty.\n\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceCapabilities?view=dsc-3.0&preserve-view=true#resolve\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/kinds?view=dsc-3.0&preserve-view=true#importer-resources\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true" + ] + } + }, + "commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "defaultSnippets": [ + { + "label": "String argument", + "markdownDescription": "Add a string argument to the command, like `config` or `--config`.", + "body": "${1:argument_name}" + }, + { + "label": "JSON input argument", + "markdownDescription": "Add a JSON input argument to the command. A command can only define one JSON input argument\nin the `args` list. When you define a JSON input argument, DSC passes the input data for\nthe command to the specified argument as a string representing the data as a compressed\nJSON object. The compressed JSON object doesn't have any spaces or newlines between the\nobject properties and values.\n\nIf the command doesn't define the `input` property, it must define a JSON input argument.\n\nIf the command defines both the `input` property and a JSON input argument, DSC sends the\ninput data to the command in both ways. For example, if the command defines `input` as\n`stdin` and has a JSON input argument in `args`, DSC sends the input data as a compressed\nJSON object over stdin and to the the specified argument.", + "body": { + "jsonInputArg": "${1:argument_name}", + "mandatory": "^$2" + } + } + ], + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command.", + "markdownDescription": "Any item in the argument array can be a string representing a static argument to pass to\nthe command.\n" + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "markdownDescription": "Defines an argument for the command that accepts the JSON input object as a string. DSC\npasses the JSON input to the named argument when available. You can define the `mandatory`\nproperty to indicate whether DSC should always pass the argument to the command, even when\nthere's no JSON input for the command. In that case, DSC passes an empty string to the\nJSON input argument. You can only define one JSON input argument per arguments array.\n\nIf you define a JSON input argument and an `input` kind for a command, DSC sends the JSON\ndata both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "markdownDescription": "Defines the argument that accepts the JSON property bag for the resource as input.\n", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "markdownDescription": "Defines whether the argument is mandatory. If this property is set to `true`, DSC\npasses an empty string when no JSON input is provided. The default value is `false`.\n", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ], + "markdownEnumDescriptions": [ + "_Environment variables_\n\n> Indicates that the resource expects the properties of an instance to be specified as\n> environment variables with the same names and casing.\n>\n> This option only supports the following data types for instance properties:\n>\n> - `boolean`\n> - `integer`\n> - `number`\n> - `string`\n> - `array` of `integer` values\n> - `array` of `number` values\n> - `array` of `string` values\n>\n> For non-array values, DSC sets the environment variable to the specified value as-is. When\n> the data type is an array of values, DSC sets the environment variable as a comma-delimited\n> string. For example, the property `foo` with a value of `[1, 2, 3]` is saved in the `foo`\n> environment variable as `\"1,2,3\"`.\n>\n> If the resource needs to support complex properties with an `object` value or multi-type\n> arrays, set this to `stdin` instead.\n", + "_JSON over `stdin`_\n\n> Indicates that the resource expects a JSON blob representing an instance from `stdin`.\n> The JSON must adhere to the instance schema.\n" + ] + }, + "returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + } + }, + "resource": { + "manifest.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the information DSC and integrating require to process and call a DSC command resource.\nFor DSC to use a manifest on a system, the manifest file must:\n\n1. Be discoverable in the `PATH` environment variable.\n1. Follow the naming convention `.dsc.resource.json`.\n1. Be valid for this schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define a resource", + "markdownDescription": "Defines a standard resource that:\n\n- Can get the current state of an instance\n- Can set an instance to the desired state\n- Relies on DSC's synthetic testing to determine whether an instance is in the desired state\n- Defines an embedded JSON schema.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "set": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "implementsPretest": "^${11:false}", + "return": "${12:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (group)", + "markdownDescription": "Defines a group resource that expects a list of resource instances and operates on them.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "group", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${18|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${19:Resources}", + "description": "${20:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + } + }, + "${21:name}": { + "title": "${22:property title}", + "description": "${23:explanation of property purpose and usage}", + "type": "${24|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (adapter)", + "markdownDescription": "Defines an adapter resource that enables users to define non-command DSC resources in the\nconfiguration.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "adapter", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "adapter": { + "config": "${18|full,sequence|}", + "list": { + "executable": "${19:executable name}", + "args": [ + "${20:argument}" + ] + } + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${23|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${24:Resources}", + "description": "${25:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + } + }, + "${26:name}": { + "title": "${27:property title}", + "description": "${28:explanation of property purpose and usage}", + "type": "${29|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (importer)", + "markdownDescription": "Defines an importer resource that can resolve an external source to nested resource\ninstances.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "importer", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "resolve": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (assertion-only)", + "markdownDescription": "Defines an assertion resource that can get the current state of an instance but not configure\nit. By default, the resource relies on DSC's synthetic testing feature. If the resource\nimplements the `test` operation itself, define the `test` property.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + } + ], + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" + ], + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\n> #### `v3` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + ] + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe semantic version ([semver][02]) of the DSC resource. This version identifies the DSC\nResource, not the version of the application it manages.\n\nThis value uses the [suggested regular expression][03] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#version\n[02]: https://semver.org/\n[03]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a short synopsis of the DSC resource's purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#description-1\n" + }, + "kind": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of searchable terms for the resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#tags\n", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$", + "patternErrorMessage": "Invalid tag. Tags must be a string of alphanumeric characters and underscores. No other\ncharacters are permitted.\n" + } + }, + "get": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json" + }, + "set": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json" + }, + "delete": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json" + }, + "export": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json" + }, + "validate": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$", + "patternErrorMessage": "Invalid exit code. Must be a string representing a 32-bit signed integer.\n" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines a map of valid exit codes for the DSC resource. DSC always interprets\nexit code `0` as a successful operation and any other exit code as an error. Use this\nproperty to indicate human-readable semantic meanings for the DSC resource's exit codes.\n\nDefine the keys in this property as strings representing a valid 32-bit signed integer. You\ncan't use alternate formats for the exit code. For example, instead of the hexadecimal value\n`0x80070005` for \"Access denied\", specify the exit code as `-2147024891`. If you're authoring\nyour resource manifest in yaml, be sure to wrap the exit code in single quotes, like\n`'0': Success` instead of `0: Success` to ensure the YAML file can be parsed correctly.\n\nDefine the value for each key as a string explaining what the exit code indicates.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#exitcodes\n", + "defaultSnippets": [ + { + "label": " Defined exit codes", + "description": "Defines exit codes with semantic meaning for the resource.", + "body": { + "0": "Success", + "${1:first exit code number}": "${2:first exit code meaning}", + "${3:second exit code number}": "${4:second exit code meaning}" + } + } + ] + }, + "schema": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ] + }, + "manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of an instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Get resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/get?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"get\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property. When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"get\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `get` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `get` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `get` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `get` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `get` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to set the desired state of an instance and how to\nprocess the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Set resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/set?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set` command. Set this value to `true` if the DSC resource tests input before modifying\nsystem state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set` command where the instance defines the `_exist` property as `false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's state after the set\noperation or the state and an array of the properties the DSC resource modified.\n\nWhen a manifest doesn't define `set.return`, DSC doesn't expect the resource to emit any\nJSON to stdout. Instead, DSC invokes the **Get** operation for the resource to construct\nthe result object, retrieving the actual state of the resource after the **Set** operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's final state after the set\n> operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's final state and an array of property\n> names that the resource modified.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `set` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `set` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `set` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `set` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `set` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to indicate whether and how the set command will\nmodify an instance and how to process the output from the DSC resource. If a resource doesn't\ndefine this command in the manifest, DSC synthesizes this behavior by converting the result of\nthe test operation for the resource into the [set result][01].\n\nThis command definition has the same structure as the [set command][02] in the resource manifest.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[What-if resource operation stdout][03].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/outputs/resource/set?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/whatif?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\", \"--what-if\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n \"--what-if\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set --what-if` command . Set this value to `true` if the DSC resource tests input before\nprocessing how it will modify system state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set --what-if` command where the instance defines the `_exist` property as\n`false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's expected state after a\nset operation in what-if mode or the state and an array of the properties the DSC resource\nwould modify.\n\nUnlike the `set.return` property, you must specify a value for `whatIf.return` for the\nresource to function correctly. When you don't define `set.return` in your resource manifest,\nDSC invokes the **Get** operation on the resource after the **Set** operation to construct\nthe result with the final state of the resource.\n\nFor what-if operations, the resource doesn't actually change the system, so invoking the\n**Get** operation after the what-if command executes will always show the final state to\nbe the same as the before state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's expected final state after the\n> set operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's expected final state and an array of\n> property names that the resource would modify.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `whatIf` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `whatIf` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `whatIf` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `whatIf` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `whatIf` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to test if an instance is in the desired state and how\nto process the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Test resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/test?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"test\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"test\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#input\n" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "default": "state", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's current state or the\nstate and an array of the properties that are out of the desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Actual state only_\n\n> Indicates that the resource returns only the instance's actual state as a JSON blob.\n", + "_Actual state and differing properties_\n\n> Indicates that the resource returns the instance's actual state and an array of\n> property names that are out of the desired state.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `test` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `test` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `test` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `test` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + "${4:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `test` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "return": "${1|state,stateAndDiff|}", + "executable": "${2:executable_name}", + "args": [ + { + "jsonInputArg": "${3:argument_name}", + "mandatory": "^$4" + } + ] + } + } + ] + }, + "manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to delete an instance. Define this method for\nresources as an alternative to handling the [`_exist`][01] property in a `set` operation, which\ncan lead to highly complex code. If the `set` method for the resource is able to handle deleting\nan instance when `_exist` is `false`, set the [`handlesExist`][02] property of the set method\ndefinition to `true` instead.\n\nIf you define the delete method in a resource manifest, ensure that you also define the\n[`_exist`][01] property in the [JSON schema for the resource's properties][03].\n\nDSC doesn't expect this command to return any output to stdout.\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"delete\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config delete\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `delete` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `delete` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `delete` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `delete` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `delete` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of every instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Export resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/export?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"export\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"export\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `export` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `export` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `export` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `export` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `export` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^3" + } + ] + } + } + ] + }, + "manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to validate the state of an instance. This method is\nmandatory for DSC group resources. It's ignored for all other DSC resources.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Validate resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/validate?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"validate\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"validate\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `validate` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `validate` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `validate` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `validate` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `validate` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to resolve an external source to nested DSC\nconfiguration document. Define this method for [importer resources][02] and set the [kind][03]\nproperty in the manifest root to `importer`.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Resolve resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/resolve?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceKind?view=dsc-3.0&preserve-view=true#importer-resources\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"resolve\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"resolve\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `resolve` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `resolve` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `resolve` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `resolve` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `resolve` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource adapter to list its supported DSC resources.\n\nFor more information about the output DSC expects from the resource for this command,\nsee [List resource operation stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/list?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", + "markdownEnumDescriptions": [ + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}" + } + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + } + } + ] + }, + "manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"schema\", \"show\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource schema show\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#args\n" + } + }, + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob\nrepresenting an instance of the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Schema resource command stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/schema?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `schema` command for the resource when no arguments are required.\n", + "body": { + "executable": "${1:executable_name}" + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the `schema` command for the resource when at least one argument is required.\n", + "body": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + ] + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON Schema DSC must use to validate a JSON blob representing an instance of the\nDSC resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type. DSC only supports JSON Schema Draft 07 and later.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n", + "markdownEnumDescriptions": [ + "_Draft 2020-12 (recommended)_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2020-12][01].\n>\n> This is the latest published draft of JSON Schema and is the draft future drafts\n> will be most compatible with.\n\n[01]: https://json-schema.org/specification-links.html#2020-12\n", + "_Draft 2019-09_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2019-09][01].\n>\n> This is the previous published draft of JSON Schema. It's mostly compatible with\n> 2020-12, but less extensible and can't be bundled.\n\n[01]: https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8\n", + "_Draft 07_\n\n> Indicates that the resource instance schema adheres to [JSON Schema Draft 07][01].\n>\n> This is an older published draft of JSON Schema. It's widely used, but incompatible\n> with 2019-09 and later. It's less expressive, extensible, maintainable, and isn't\n> recommended for new schema definitions.\n\n[01]: https://json-schema.org/specification-links.html#draft-7\n" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the unique ID for the DSC resource's instance schema. If the instance schema is\npublished to its own public URI, set this keyword to that URI.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#id\n" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties that DSC can retrieve and manage for the resource's instances.\nThis keyword must define at least one property as a key-value pair. The key is the\nproperty's name. The value is a subschema that validates the property.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#properties\n", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": { + "defaultSnippets": [ + { + "label": " Define a property", + "markdownDescription": "Define a new property for the resource instance schema.", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + }, + { + "label": " Define a property (boolean)", + "markdownDescription": "Define a new [boolean][01] property for the resource instance schema, requiring the\nvalue to be either `true` or `false`.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/boolean.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "boolean" + } + }, + { + "label": " Define a property (string)", + "markdownDescription": "Define a new [string][01] property for the resource instance schema, requiring the\nvalue to be a blob of text.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/string.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "string" + } + }, + { + "label": " Define a property (integer)", + "markdownDescription": "Define a new [integer][01] property for the resource instance schema, requiring the\nvalue to be a number without a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "integer" + } + }, + { + "label": " Define a property (number)", + "markdownDescription": "Define a new [number][01] property for the resource instance schema, requiring the\nvalue to be a number that may include a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "number" + } + }, + { + "label": " Define a property (array)", + "markdownDescription": "Define a new [array][01] property for the resource instance schema, requiring the\nvalue to be a list of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/array.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "array", + "items": { + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + } + }, + { + "label": " Define a property (object)", + "markdownDescription": "Define a new [object][01] property for the resource instance schema, requiring the\nvalue to be a set of key-value pairs.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/object.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "object", + "properties": { + "${3:propertyName}": { + "title": "${4:propertyTitle}", + "description": "${5:explanation of property purpose and usage}", + "type": "${6|string,integer,number,array,object,null|}" + } + } + } + }, + { + "label": " Define a property (enum)", + "markdownDescription": "Define a new [enum][01] property for the resource instance schema that only accepts\na defined set of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "enum": [ + "^${3:\"first value\"}", + "^${4:\"second value\"}" + ] + } + }, + { + "label": " Define a property (const)", + "markdownDescription": "Define a new [const][01] property for the resource instance schema that only\naccepts a specific value.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "const": "^${3:\"constant value\"}" + } + } + ] + }, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the resource can enforce whether instances exist, handling whether an\ninstance should be added, updated, or removed during a set operation. The default\nvalue is `true`.\n\nResources that define this property declare that the implementation adheres to the\nfollowing behavior contract:\n\n1. When the desired state for `_exist` is `true`, the resource expects the instance\n to exist. If it doesn't exist, the resource creates or adds the instance during\n the set operation.\n1. When the desired state for `_exist` is `false`, the resource expects the instance\n to not exist. If it does exist, the resource deletes or removes the instance\n during the set operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource returns this value for it's own `test` method. This\nproperty is mandatory when the manifest defines the `test` property. It shouldn't\nbe included if the DSC resource relies on DSC's synthetic testing.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/indesiredstate?view=dsc-3.0&preserve-view=true\n" + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_purge` property to specify\nwhether the DSC resource should remove all non-specified members when it manages\nan array of members or values.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/purge?view=dsc-3.0&preserve-view=true\n" + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_rebootRequested` property to\nreport whether the machine should be rebooted after the `set` method executes.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/rebootrequested?view=dsc-3.0&preserve-view=true\n" + } + }, + "defaultSnippets": [ + { + "label": " Define an instance property", + "markdownDescription": "Define a property for the resource instance schema.", + "body": { + "${1:propertyName}": { + "title": "${2:property title}", + "description": "${3:explanation of property purpose and usage}", + "type": "${4|string,integer,number,array,object,null|}" + } + } + } + ] + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must validate a JSON blob representing an instance of the DSC resource.\n\nThe JSON schema can be defined dynamically with the `command` property or statically with the\n`embedded` property.\n\nFor development purposes, it can be more convenient to use the `command` property and avoid\nneeding to adjust both the code and the schema.\n\nMicrosoft recommends using the `embedded` property when publishing a resource publicly. When the\nmanifest declares the schema with the `command` property, DSC calls the command at the beginning\nof any operation using the resource, possibly impacting performance. The schema is also\nunavailable to integrating tools when the resource isn't installed locally. When the schema is\nembedded in the manifest, DSC and integrating tools only need the manifest itself.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define as command without arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when no arguments are required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}" + } + } + }, + { + "label": " Define as command with arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when at least one argument is required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + }, + { + "label": " Define as an embedded schema", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema embedded in the manifest. This is the preferred option\nfor publicly published resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "body": { + "embedded": { + "${escape_dollar:$}schema": "${1|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${2:name}": { + "title": "${3:property title}", + "description": "${4:explanation of property purpose and usage}", + "type": "${5|string,integer,number,array,object,null|}" + } + } + } + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/schema.json b/schemas/v3.0.2/bundled/outputs/resource/schema.json new file mode 100644 index 00000000..f3e0e422 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/schema.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/schema.vscode.json b/schemas/v3.0.2/bundled/outputs/resource/schema.vscode.json new file mode 100644 index 00000000..f3e0e422 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/schema.vscode.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/set.json b/schemas/v3.0.2/bundled/outputs/resource/set.json new file mode 100644 index 00000000..fa996921 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/set.json @@ -0,0 +1,129 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.2/outputs/resource/set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/set.vscode.json b/schemas/v3.0.2/bundled/outputs/resource/set.vscode.json new file mode 100644 index 00000000..1f848848 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/set.vscode.json @@ -0,0 +1,155 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "outputs": { + "resource": { + "set.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + }, + "set.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json" + } + } + } + } + }, + "metadata": { + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "Microsoft.DSC": { + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } + }, + "definitions": { + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/test.json b/schemas/v3.0.2/bundled/outputs/resource/test.json new file mode 100644 index 00000000..58917e69 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/test.json @@ -0,0 +1,135 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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/v3.0.2/outputs/resource/test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json" + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/resource/test.vscode.json b/schemas/v3.0.2/bundled/outputs/resource/test.vscode.json new file mode 100644 index 00000000..bccc1598 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/resource/test.vscode.json @@ -0,0 +1,161 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "outputs": { + "resource": { + "test.simple.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } + }, + "test.full.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json" + } + } + } + } + }, + "metadata": { + "resourceInstanceResult.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } + }, + "Microsoft.DSC": { + "duration.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" + } + } + }, + "definitions": { + "instanceName.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1, + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" + }, + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/bundled/outputs/schema.json b/schemas/v3.0.2/bundled/outputs/schema.json new file mode 100644 index 00000000..00af1340 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/schema.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.2/bundled/outputs/schema.vscode.json b/schemas/v3.0.2/bundled/outputs/schema.vscode.json new file mode 100644 index 00000000..00af1340 --- /dev/null +++ b/schemas/v3.0.2/bundled/outputs/schema.vscode.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.", + "type": "object", + "$defs": {} +} diff --git a/schemas/v3.0.2/bundled/resource/manifest.json b/schemas/v3.0.2/bundled/resource/manifest.json new file mode 100644 index 00000000..231d32bf --- /dev/null +++ b/schemas/v3.0.2/bundled/resource/manifest.json @@ -0,0 +1,1148 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" + ] + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "get": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json" + }, + "set": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json" + }, + "delete": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json" + }, + "export": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json" + }, + "validate": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ] + }, + "schema": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ], + "$defs": { + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "default": "state" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources." + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource." + } + } + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": {}, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json" + } + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json" + } + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json" + } + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json" + } + } + } + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command." + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json", + "title": "Instance should exist", + "description": "Indicates whether the DSC resource instance should exist.", + "type": "boolean", + "default": true, + "enum": [ + false, + true + ] + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json", + "title": "Instance is in the Desired State", + "description": "Indicates whether the instance is in the desired state. This property is only returned by the `test` method.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json", + "title": "Purge", + "description": "Indicates that only the components described in the DSC resource should exist. If other components exist, the DSC resource is out of the desired state. When enforcing desired state, the DSC resource removes unmanaged components.", + "type": [ + "boolean", + "null" + ], + "writeOnly": true + }, + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json", + "title": "Reboot Requested", + "description": "Indicates that the set operation requires a reboot before it's fully complete.", + "type": [ + "boolean", + "null" + ], + "readOnly": true + } + } +} diff --git a/schemas/v3.0.2/bundled/resource/manifest.vscode.json b/schemas/v3.0.2/bundled/resource/manifest.vscode.json new file mode 100644 index 00000000..26c28f39 --- /dev/null +++ b/schemas/v3.0.2/bundled/resource/manifest.vscode.json @@ -0,0 +1,1999 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the information DSC and integrating require to process and call a DSC command resource.\nFor DSC to use a manifest on a system, the manifest file must:\n\n1. Be discoverable in the `PATH` environment variable.\n1. Follow the naming convention `.dsc.resource.json`.\n1. Be valid for this schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define a resource", + "markdownDescription": "Defines a standard resource that:\n\n- Can get the current state of an instance\n- Can set an instance to the desired state\n- Relies on DSC's synthetic testing to determine whether an instance is in the desired state\n- Defines an embedded JSON schema.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "set": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "implementsPretest": "^${11:false}", + "return": "${12:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (group)", + "markdownDescription": "Defines a group resource that expects a list of resource instances and operates on them.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "group", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${18|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${19:Resources}", + "description": "${20:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + } + }, + "${21:name}": { + "title": "${22:property title}", + "description": "${23:explanation of property purpose and usage}", + "type": "${24|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (adapter)", + "markdownDescription": "Defines an adapter resource that enables users to define non-command DSC resources in the\nconfiguration.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "adapter", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "test": { + "executable": "${8:executable name}", + "args": [ + "${9:argument}" + ], + "input": "${10:stdin}", + "return": "${12:state}" + }, + "set": { + "executable": "${13:executable name}", + "args": [ + "${14:argument}" + ], + "input": "${15:stdin}", + "implementsPretest": "^${16:false}", + "return": "${17:state}" + }, + "adapter": { + "config": "${18|full,sequence|}", + "list": { + "executable": "${19:executable name}", + "args": [ + "${20:argument}" + ] + } + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${23|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "resources": { + "title": "${24:Resources}", + "description": "${25:Defines a list of resource instances to process}", + "type": "array", + "items": { + "${escape_dollar:$}ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + } + }, + "${26:name}": { + "title": "${27:property title}", + "description": "${28:explanation of property purpose and usage}", + "type": "${29|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (importer)", + "markdownDescription": "Defines an importer resource that can resolve an external source to nested resource\ninstances.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "kind": "importer", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "resolve": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + }, + { + "label": " Define a resource (assertion-only)", + "markdownDescription": "Defines an assertion resource that can get the current state of an instance but not configure\nit. By default, the resource relies on DSC's synthetic testing feature. If the resource\nimplements the `test` operation itself, define the `test` property.", + "body": { + "${escape_dollar:$}schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "type": "${1:owner.area.group}/${2:${TM_FILENAME_BASE/^(.*?)[\\.]dsc[\\.]resource/$1/}}", + "version": "${3:0.1.0}", + "description": "${4:Synopsis for the resource's purpose}", + "get": { + "executable": "${5:executable name}", + "args": [ + "${6:argument}" + ], + "input": "${7:stdin}" + }, + "schema": { + "embedded": { + "${escape_dollar:$}schema": "${13|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${14:name}": { + "title": "${15:property title}", + "description": "${16:explanation of property purpose and usage}", + "type": "${17|string,integer,number,array,object,null|}" + } + } + } + } + } + } + ], + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" + ], + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\n> #### `v3` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", + "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", + "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + ] + }, + "type": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe semantic version ([semver][02]) of the DSC resource. This version identifies the DSC\nResource, not the version of the application it manages.\n\nThis value uses the [suggested regular expression][03] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#version\n[02]: https://semver.org/\n[03]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a short synopsis of the DSC resource's purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#description-1\n" + }, + "kind": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of searchable terms for the resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#tags\n", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$", + "patternErrorMessage": "Invalid tag. Tags must be a string of alphanumeric characters and underscores. No other\ncharacters are permitted.\n" + } + }, + "get": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json" + }, + "set": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json" + }, + "delete": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json" + }, + "export": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json" + }, + "validate": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$", + "patternErrorMessage": "Invalid exit code. Must be a string representing a 32-bit signed integer.\n" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines a map of valid exit codes for the DSC resource. DSC always interprets\nexit code `0` as a successful operation and any other exit code as an error. Use this\nproperty to indicate human-readable semantic meanings for the DSC resource's exit codes.\n\nDefine the keys in this property as strings representing a valid 32-bit signed integer. You\ncan't use alternate formats for the exit code. For example, instead of the hexadecimal value\n`0x80070005` for \"Access denied\", specify the exit code as `-2147024891`. If you're authoring\nyour resource manifest in yaml, be sure to wrap the exit code in single quotes, like\n`'0': Success` instead of `0: Success` to ensure the YAML file can be parsed correctly.\n\nDefine the value for each key as a string explaining what the exit code indicates.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#exitcodes\n", + "defaultSnippets": [ + { + "label": " Defined exit codes", + "description": "Defines exit codes with semantic meaning for the resource.", + "body": { + "0": "Success", + "${1:first exit code number}": "${2:first exit code meaning}", + "${3:second exit code number}": "${4:second exit code meaning}" + } + } + ] + }, + "schema": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ], + "$defs": { + "PowerShell": { + "DSC": { + "main": { + "schemas": { + "v3.0.2": { + "definitions": { + "resourceType.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", + "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" + }, + "semver.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "patternErrorMessage": "Invalid value, must be a semantic version like `..`, such as `1.2.3`.\n\nThe value may also include pre-release version information and build metadata.\n", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" + }, + "resourceKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should interpret the resource - as a typical resource, an adapter, a group, or an\nimporter. This property is required for group, exporter, and importer resources.\n\nDSC infers the default value for this property based on whether the [adapter][02] property is\ndefined in the manifest:\n\n- If the `adapter` property is defined in the manifest, the default `kind` is `adapter`.\n- If the `adapter` property is not defined in the manifest, the default `kind` is `resource`.\n\nFor more information about the different kinds of DSC resources, see [DSC resource kinds][01]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n[01]: https://learn.microsoft.com/powershell/dsc/concepts/resources/kinds?view=dsc-3.0&preserve-view=true\n", + "markdownEnumDescriptions": [ + "\n\nIndicates that the manifest is for a typical DSC command resource.\n", + "\n\nIndicates that the manifest is for a resource that enables the use of non-command resources\nwith DSC.\n", + "\n\nIndicates that the manifest is for a resource that processes an array of nested resource\ninstances.\n", + "\n\nIndicates that the manifest is for a resource that resolves an external source to DSC\nresource instances. DSC processes the resolved instances as nested instances for the importer\nresource.\n" + ] + }, + "commandExecutable.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" + }, + "commandArgs.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "defaultSnippets": [ + { + "label": "String argument", + "markdownDescription": "Add a string argument to the command, like `config` or `--config`.", + "body": "${1:argument_name}" + }, + { + "label": "JSON input argument", + "markdownDescription": "Add a JSON input argument to the command. A command can only define one JSON input argument\nin the `args` list. When you define a JSON input argument, DSC passes the input data for\nthe command to the specified argument as a string representing the data as a compressed\nJSON object. The compressed JSON object doesn't have any spaces or newlines between the\nobject properties and values.\n\nIf the command doesn't define the `input` property, it must define a JSON input argument.\n\nIf the command defines both the `input` property and a JSON input argument, DSC sends the\ninput data to the command in both ways. For example, if the command defines `input` as\n`stdin` and has a JSON input argument in `args`, DSC sends the input data as a compressed\nJSON object over stdin and to the the specified argument.", + "body": { + "jsonInputArg": "${1:argument_name}", + "mandatory": "^$2" + } + } + ], + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command.", + "markdownDescription": "Any item in the argument array can be a string representing a static argument to pass to\nthe command.\n" + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "markdownDescription": "Defines an argument for the command that accepts the JSON input object as a string. DSC\npasses the JSON input to the named argument when available. You can define the `mandatory`\nproperty to indicate whether DSC should always pass the argument to the command, even when\nthere's no JSON input for the command. In that case, DSC passes an empty string to the\nJSON input argument. You can only define one JSON input argument per arguments array.\n\nIf you define a JSON input argument and an `input` kind for a command, DSC sends the JSON\ndata both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "markdownDescription": "Defines the argument that accepts the JSON property bag for the resource as input.\n", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "markdownDescription": "Defines whether the argument is mandatory. If this property is set to `true`, DSC\npasses an empty string when no JSON input is provided. The default value is `false`.\n", + "type": "boolean", + "default": false + } + } + } + ] + } + }, + "inputKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ], + "markdownEnumDescriptions": [ + "_Environment variables_\n\n> Indicates that the resource expects the properties of an instance to be specified as\n> environment variables with the same names and casing.\n>\n> This option only supports the following data types for instance properties:\n>\n> - `boolean`\n> - `integer`\n> - `number`\n> - `string`\n> - `array` of `integer` values\n> - `array` of `number` values\n> - `array` of `string` values\n>\n> For non-array values, DSC sets the environment variable to the specified value as-is. When\n> the data type is an array of values, DSC sets the environment variable as a comma-delimited\n> string. For example, the property `foo` with a value of `[1, 2, 3]` is saved in the `foo`\n> environment variable as `\"1,2,3\"`.\n>\n> If the resource needs to support complex properties with an `object` value or multi-type\n> arrays, set this to `stdin` instead.\n", + "_JSON over `stdin`_\n\n> Indicates that the resource expects a JSON blob representing an instance from `stdin`.\n> The JSON must adhere to the instance schema.\n" + ] + }, + "returnKind.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." + } + }, + "resource": { + "manifest.get.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of an instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Get resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/get?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"get\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property. When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"get\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config get --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `get` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `get` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/get?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `get` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `get` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `get` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.set.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to set the desired state of an instance and how to\nprocess the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Set resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/set?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set` command. Set this value to `true` if the DSC resource tests input before modifying\nsystem state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set` command where the instance defines the `_exist` property as `false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's state after the set\noperation or the state and an array of the properties the DSC resource modified.\n\nWhen a manifest doesn't define `set.return`, DSC doesn't expect the resource to emit any\nJSON to stdout. Instead, DSC invokes the **Get** operation for the resource to construct\nthe result object, retrieving the actual state of the resource after the **Set** operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's final state after the set\n> operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's final state and an array of property\n> names that the resource modified.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `set` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `set` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `set` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `set` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `set` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.whatIf.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to indicate whether and how the set command will\nmodify an instance and how to process the output from the DSC resource. If a resource doesn't\ndefine this command in the manifest, DSC synthesizes this behavior by converting the result of\nthe test operation for the resource into the [set result][01].\n\nThis command definition has the same structure as the [set command][02] in the resource manifest.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[What-if resource operation stdout][03].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/outputs/resource/set?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/whatif?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"set\", \"--what-if\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n \"--what-if\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --what-if --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#input\n" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource performs its own test to ensure idempotency when calling the\n`set --what-if` command . Set this value to `true` if the DSC resource tests input before\nprocessing how it will modify system state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#implementspretest\n" + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the DSC resource has its own built-in handling for the [`_exist`][02] common\nproperty. Set this value to `true` if the DSC resource handles instance deletion internally\nwhen receiving a `set --what-if` command where the instance defines the `_exist` property as\n`false`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#handlesExist\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's expected state after a\nset operation in what-if mode or the state and an array of the properties the DSC resource\nwould modify.\n\nUnlike the `set.return` property, you must specify a value for `whatIf.return` for the\nresource to function correctly. When you don't define `set.return` in your resource manifest,\nDSC invokes the **Get** operation on the resource after the **Set** operation to construct\nthe result with the final state of the resource.\n\nFor what-if operations, the resource doesn't actually change the system, so invoking the\n**Get** operation after the what-if command executes will always show the final state to\nbe the same as the before state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Final state only_\n\n> Indicates that the resource returns only the instance's expected final state after the\n> set operation as a JSON blob.\n", + "_Final state and changed properties_\n\n> Indicates that the resource returns the instance's expected final state and an array of\n> property names that the resource would modify.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `whatIf` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `whatIf` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/whatif?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `whatIf` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `whatIf` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "implementsPretest": "^${2|true,false|}", + "return": "${3|state,stateAndDiff|}", + "executable": "${4:executable_name}", + "args": [ + "${5:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `whatIf` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "implementsPretest": "^${1|true,false|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + { + "jsonInputArg": "${4:argument_name}", + "mandatory": "^$5" + } + ] + } + } + ] + }, + "manifest.test.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to test if an instance is in the desired state and how\nto process the output from the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Test resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/test?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"test\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"test\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config test --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#input\n" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "default": "state", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the command returns a JSON blob of the DSC resource's current state or the\nstate and an array of the properties that are out of the desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true#return\n", + "markdownEnumDescriptions": [ + "_Actual state only_\n\n> Indicates that the resource returns only the instance's actual state as a JSON blob.\n", + "_Actual state and differing properties_\n\n> Indicates that the resource returns the instance's actual state and an array of\n> property names that are out of the desired state.\n" + ] + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `test` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `test` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/test?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `test` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `test` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "return": "${2|state,stateAndDiff|}", + "executable": "${3:executable_name}", + "args": [ + "${4:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `test` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "return": "${1|state,stateAndDiff|}", + "executable": "${2:executable_name}", + "args": [ + { + "jsonInputArg": "${3:argument_name}", + "mandatory": "^$4" + } + ] + } + } + ] + }, + "manifest.delete.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to delete an instance. Define this method for\nresources as an alternative to handling the [`_exist`][01] property in a `set` operation, which\ncan lead to highly complex code. If the `set` method for the resource is able to handle deleting\nan instance when `_exist` is `false`, set the [`handlesExist`][02] property of the set method\ndefinition to `true` instead.\n\nIf you define the delete method in a resource manifest, ensure that you also define the\n[`_exist`][01] property in the [JSON schema for the resource's properties][03].\n\nDSC doesn't expect this command to return any output to stdout.\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/set?view=dsc-3.0&preserve-view=true#handlesExist\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"delete\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config delete\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"set\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config set --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `delete` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `delete` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/delete?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `delete` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `delete` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `delete` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.export.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the current state of every instance.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Export resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/export?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"export\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"export\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config export --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `export` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `export` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/export?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `export` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `export` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `export` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^3" + } + ] + } + } + ] + }, + "manifest.validate.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to validate the state of an instance. This method is\nmandatory for DSC group resources. It's ignored for all other DSC resources.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Validate resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/validate?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"validate\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"validate\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config validate --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `validate` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `validate` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/validate?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `validate` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `validate` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `validate` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.resolve.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to resolve an external source to nested DSC\nconfiguration document. Define this method for [importer resources][02] and set the [kind][03]\nproperty in the manifest root to `importer`.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Resolve resource operation stdout][01].\n\nDSC sends data to the command in three ways:\n\n1. When `input` is `stdin`, DSC sends the data as a string representing the data as a compressed\n JSON object without spaces or newlines between the object properties.\n1. When `input` is `env`, DSC sends the data as environment variables. It creates an environment\n variable for each property in the input data object, using the name and value of the property.\n1. When the `args` array includes a JSON input argument definition, DSC sends the data as a string\n representing the data as a compressed JSON object to the specified argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't pass\nthe input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or\nboth.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/resolve?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourceKind?view=dsc-3.0&preserve-view=true#importer-resources\n[03]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#kind\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"config\", \"resolve\"]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve\n```\n\nIf you want to pass the JSON object representing the property bag for a resource instance to\nan argument, you can define a single item in the array as a JSON object. Indicate the name of\nthe argument with the `jsonInputArg` string property and whether the argument is mandatory\nfor the command with the `mandatory` boolean property.` When the `mandatory` property is\ndefined as `true`, DSC passes an empty string to the argument when no JSON input is\navailable. When the `mandatory` property is undefined or defined as `false`, DSC doesn't pass\nthe argument at all when no JSON input is available. The default value for the `mandatory`\nproperty is `false`.\n\nFor example, given the following definition:\n\n```json\n{\n \"executable\": \"myresource\"\n \"args\": [\n \"config\",\n \"resolve\",\n { \"jsonInputArg\": \"--properties\" }\n ]\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource config resolve --properties \n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#args\n" + }, + "input": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC should pass input to the command, either as environment variables or JSON\nover `stdin`. This property is optional when you define an object in the `args` list. If\nyou define a JSON input argument and an `input`, DSC sends the JSON data both ways:\n\n- If you define `input` as `env` and a JSON input argument, DSC sets an environment variable\n for each property in the JSON input and passes the JSON input object as a string to the\n defined argument.\n- If you define `input` as `stdin` and a JSON input argument, DSC passes the JSON input over\n stdin and as a string to the defined argument.\n- If you define a JSON input argument without defining the `input` property, DSC only passes\n the JSON input as a string to the defined argument.\n\nIf you don't define the `input` property and don't define a JSON input argument, DSC can't\npass the input JSON to the resource. This makes the manifest invalid. You must define the\n`input` property, a JSON input argument in the `args` property array, or both.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true#input\n" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "errorMessage": "The `resolve` command doesn't define either the `input` property or a JSON input argument, or it defines more than one JSON input argument. If you don't define the `input` property and don't define a JSON input argument, DSC can't pass the input JSON to the resource. You can only define one JSON input argument for a command.\n\nYou must define the `input` property, one JSON input argument in the `args` property array, or both. For more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "errorMessage": "You can only specify one JSON input argument for the `resolve` command. Remove the extra JSON input argument. When you use the JSON input argument, DSC sends the full JSON object as a string to the named argument.\n\nFor more information, see:\n\nhttps://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/resolve?view=dsc-3.0&preserve-view=true", + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `resolve` command for the resource when no arguments are required and the JSON\ninput is sent over stdin or as environment variables.\n", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}" + } + }, + { + "label": " Define with string arguments", + "markdownDescription": "Define the `resolve` command for the resource when at least one argument is required and the\nJSON input is sent over stdin or as environment variables.", + "body": { + "input": "${1|stdin,env|}", + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + }, + { + "label": " Define with a JSON input argument", + "markdownDescription": "Define the `resolve` command for the resource where the JSON input is passed as a one-line\nJSON object string to the specified argument.", + "body": { + "executable": "${1:executable_name}", + "args": [ + { + "jsonInputArg": "${2:argument_name}", + "mandatory": "^$3" + } + ] + } + } + ] + }, + "manifest.adapter.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to\nmanage resources that don't have their own manifests with DSC.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource adapter to list its supported DSC resources.\n\nFor more information about the output DSC expects from the resource for this command,\nsee [List resource operation stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#list\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/list?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"registry\",\n \"args\": [\"resources\", \"list\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nregistry resources list\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#args\n" + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines whether the adapter expects to receive a full and unprocessed configuration as a\nsingle JSON blob over stdin or a sequence of JSON Lines for each child resource's\nconfigurations.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/adapter?view=dsc-3.0&preserve-view=true#config\n", + "markdownEnumDescriptions": [ + "_Full and unprocessed config as a JSON blob_\n\n> Indicates that the adapter expects a JSON blob containing the full and unprocessed\n> configuration as a single JSON blob over `stdin`.\n", + "_Resource instances as JSON Lines_\n\n> Indicates that the adapter expects each resource's configuration as a [JSON Line][01]\n> over `stdin`.\n\n[01]: https://jsonlines.org/\n" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ], + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when no arguments are\nrequired.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}" + } + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the adapter config kind and `list` command for the resource when at least one\nargument is required.\n", + "body": { + "config": "${1|full,sequence}", + "list": { + "executable": "${2:executable_name}", + "args": [ + "${3:--first-argument}" + ] + } + } + } + ] + }, + "manifest.schema.json": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the name of the command to run. The value must be the name of a command discoverable\nin the system's `PATH` environment variable or the full path to the command. A file extension\nis only required when the command isn't recognizable by the operating system as an\nexecutable.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#executable\n" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an array of strings to pass as arguments to the command. DSC passes the arguments to\nthe command in the order they're specified.\n\nFor example, the given the following definition:\n\n```json\n{\n \"executable\": \"myresource\",\n \"args\": [\"schema\", \"show\"],\n}\n```\n\nDSC invokes the command for the resource as:\n\n```bash\nmyresource schema show\n```\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#args\n" + } + }, + "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nDefines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob\nrepresenting an instance of the DSC resource.\n\nFor more information about the output DSC expects the resource to emit for this command, see\n[Schema resource command stdout][01].\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/stdout/schema?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define without arguments", + "markdownDescription": "Define the `schema` command for the resource when no arguments are required.\n", + "body": { + "executable": "${1:executable_name}" + } + }, + { + "label": " Define with arguments", + "markdownDescription": "Define the `schema` command for the resource when at least one argument is required.\n", + "body": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + ] + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON Schema DSC must use to validate a JSON blob representing an instance of the\nDSC resource.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the JSON type for an instance of the DSC resource. DSC resource instances always\nhave the `object` type. DSC only supports JSON Schema Draft 07 and later.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true#type\n", + "markdownEnumDescriptions": [ + "_Draft 2020-12 (recommended)_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2020-12][01].\n>\n> This is the latest published draft of JSON Schema and is the draft future drafts\n> will be most compatible with.\n\n[01]: https://json-schema.org/specification-links.html#2020-12\n", + "_Draft 2019-09_\n\n> Indicates that the resource instance schema adheres to\n> [JSON Schema Draft 2019-09][01].\n>\n> This is the previous published draft of JSON Schema. It's mostly compatible with\n> 2020-12, but less extensible and can't be bundled.\n\n[01]: https://json-schema.org/specification-links.html#draft-2019-09-formerly-known-as-draft-8\n", + "_Draft 07_\n\n> Indicates that the resource instance schema adheres to [JSON Schema Draft 07][01].\n>\n> This is an older published draft of JSON Schema. It's widely used, but incompatible\n> with 2019-09 and later. It's less expressive, extensible, maintainable, and isn't\n> recommended for new schema definitions.\n\n[01]: https://json-schema.org/specification-links.html#draft-7\n" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the unique ID for the DSC resource's instance schema. If the instance schema is\npublished to its own public URI, set this keyword to that URI.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#id\n" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties that DSC can retrieve and manage for the resource's instances.\nThis keyword must define at least one property as a key-value pair. The key is the\nproperty's name. The value is a subschema that validates the property.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#properties\n", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": { + "defaultSnippets": [ + { + "label": " Define a property", + "markdownDescription": "Define a new property for the resource instance schema.", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + }, + { + "label": " Define a property (boolean)", + "markdownDescription": "Define a new [boolean][01] property for the resource instance schema, requiring the\nvalue to be either `true` or `false`.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/boolean.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "boolean" + } + }, + { + "label": " Define a property (string)", + "markdownDescription": "Define a new [string][01] property for the resource instance schema, requiring the\nvalue to be a blob of text.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/string.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "string" + } + }, + { + "label": " Define a property (integer)", + "markdownDescription": "Define a new [integer][01] property for the resource instance schema, requiring the\nvalue to be a number without a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "integer" + } + }, + { + "label": " Define a property (number)", + "markdownDescription": "Define a new [number][01] property for the resource instance schema, requiring the\nvalue to be a number that may include a fractional part.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/numeric.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "number" + } + }, + { + "label": " Define a property (array)", + "markdownDescription": "Define a new [array][01] property for the resource instance schema, requiring the\nvalue to be a list of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/array.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "array", + "items": { + "type": "${3|boolean,string,integer,number,array,object,null|}" + } + } + }, + { + "label": " Define a property (object)", + "markdownDescription": "Define a new [object][01] property for the resource instance schema, requiring the\nvalue to be a set of key-value pairs.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/object.html", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "type": "object", + "properties": { + "${3:propertyName}": { + "title": "${4:propertyTitle}", + "description": "${5:explanation of property purpose and usage}", + "type": "${6|string,integer,number,array,object,null|}" + } + } + } + }, + { + "label": " Define a property (enum)", + "markdownDescription": "Define a new [enum][01] property for the resource instance schema that only accepts\na defined set of values.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "enum": [ + "^${3:\"first value\"}", + "^${4:\"second value\"}" + ] + } + }, + { + "label": " Define a property (const)", + "markdownDescription": "Define a new [const][01] property for the resource instance schema that only\naccepts a specific value.\n\n[01]: https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values", + "body": { + "title": "${1:property title}", + "description": "${2:explanation of property purpose and usage}", + "const": "^${3:\"constant value\"}" + } + } + ] + }, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the resource can enforce whether instances exist, handling whether an\ninstance should be added, updated, or removed during a set operation. The default\nvalue is `true`.\n\nResources that define this property declare that the implementation adheres to the\nfollowing behavior contract:\n\n1. When the desired state for `_exist` is `true`, the resource expects the instance\n to exist. If it doesn't exist, the resource creates or adds the instance during\n the set operation.\n1. When the desired state for `_exist` is `false`, the resource expects the instance\n to not exist. If it does exist, the resource deletes or removes the instance\n during the set operation.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/exist?view=dsc-3.0&preserve-view=true\n" + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource returns this value for it's own `test` method. This\nproperty is mandatory when the manifest defines the `test` property. It shouldn't\nbe included if the DSC resource relies on DSC's synthetic testing.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/indesiredstate?view=dsc-3.0&preserve-view=true\n" + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_purge` property to specify\nwhether the DSC resource should remove all non-specified members when it manages\nan array of members or values.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/purge?view=dsc-3.0&preserve-view=true\n" + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json" + }, + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nIndicates that the DSC resource uses the standard `_rebootRequested` property to\nreport whether the machine should be rebooted after the `set` method executes.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/properties/rebootrequested?view=dsc-3.0&preserve-view=true\n" + } + }, + "defaultSnippets": [ + { + "label": " Define an instance property", + "markdownDescription": "Define a property for the resource instance schema.", + "body": { + "${1:propertyName}": { + "title": "${2:property title}", + "description": "${3:explanation of property purpose and usage}", + "type": "${4|string,integer,number,array,object,null|}" + } + } + } + ] + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ], + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines how DSC must validate a JSON blob representing an instance of the DSC resource.\n\nThe JSON schema can be defined dynamically with the `command` property or statically with the\n`embedded` property.\n\nFor development purposes, it can be more convenient to use the `command` property and avoid\nneeding to adjust both the code and the schema.\n\nMicrosoft recommends using the `embedded` property when publishing a resource publicly. When the\nmanifest declares the schema with the `command` property, DSC calls the command at the beginning\nof any operation using the resource, possibly impacting performance. The schema is also\nunavailable to integrating tools when the resource isn't installed locally. When the schema is\nembedded in the manifest, DSC and integrating tools only need the manifest itself.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true\n", + "defaultSnippets": [ + { + "label": " Define as command without arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when no arguments are required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}" + } + } + }, + { + "label": " Define as command with arguments", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema as a command when at least one argument is required.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/property?view=dsc-3.0&preserve-view=true#command\n", + "body": { + "command": { + "executable": "${1:executable_name}", + "args": [ + "${2:--first-argument}" + ] + } + } + }, + { + "label": " Define as an embedded schema", + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefine the resource instance schema embedded in the manifest. This is the preferred option\nfor publicly published resources.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/schema/embedded?view=dsc-3.0&preserve-view=true\n", + "body": { + "embedded": { + "${escape_dollar:$}schema": "${1|https://json-schema.org/draft/2020-12/schema,https://json-schema.org/draft/2019-09/schema,http://json-schema.org/draft-07/schema#|}", + "type": "object", + "properties": { + "${2:name}": { + "title": "${3:property title}", + "description": "${4:explanation of property purpose and usage}", + "type": "${5|string,integer,number,array,object,null|}" + } + } + } + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/schemas/v3.0.2/config/document.json b/schemas/v3.0.2/config/document.json new file mode 100644 index 00000000..b18067ac --- /dev/null +++ b/schemas/v3.0.2/config/document.json @@ -0,0 +1,76 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "title": "DSC configuration document schema", + "description": "Describes a valid DSC configuration document.", + "type": "object", + "required": [ + "$schema", + "resources" + ], + "properties": { + "$schema": { + "title": "Schema", + "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" + ] + }, + "parameters": { + "title": "DSC configuration document parameters", + "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", + "type": "object", + "additionalProperties": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json" + } + }, + "variables": { + "title": "Configuration variables", + "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", + "type": "object" + }, + "resources": { + "title": "DSC configuration document resources", + "description": "Defines a list of DSC resource instances for the configuration to manage.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json" + } + }, + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json" + } + } +} diff --git a/schemas/v3.0.2/config/document.metadata.json b/schemas/v3.0.2/config/document.metadata.json new file mode 100644 index 00000000..b758e188 --- /dev/null +++ b/schemas/v3.0.2/config/document.metadata.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.metadata.json", + "title": "Configuration metadata", + "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", + "type": "object", + "properties": { + "Microsoft.DSC": { + "type": "object", + "title": "DSC metadata", + "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", + "unevaluatedProperties": false, + "properties": { + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "default": "Current", + "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`." + } + } + } + } +} diff --git a/schemas/v3.0.2/config/document.parameter.json b/schemas/v3.0.2/config/document.parameter.json new file mode 100644 index 00000000..693b40a2 --- /dev/null +++ b/schemas/v3.0.2/config/document.parameter.json @@ -0,0 +1,228 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.parameter.json", + "title": "Parameter", + "description": "Defines a runtime option for a DSC configuration document.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json" + }, + "defaultValue": { + "title": "Default value", + "description": "Defines the default value for the parameter.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json" + }, + "allowedValues": { + "title": "Allowed values", + "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json" + } + }, + "description": { + "title": "Parameter description", + "description": "Defines a synopsis for the parameter explaining its purpose.", + "type": "string" + }, + "metadata": { + "title": "Parameter metadata", + "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", + "type": "object" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "minValue": { + "title": "Minimum value", + "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", + "type": "integer" + }, + "maxValue": { + "title": "Maximum value", + "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", + "type": "integer" + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + }, + { + "properties": { + "type": { + "const": "array" + } + } + } + ] + }, + "then": { + "properties": { + "minLength": { + "title": "Minimum length", + "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", + "type": "integer", + "minimum": 0 + }, + "maxLength": { + "title": "Maximum length", + "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", + "type": "integer", + "minimum": 0 + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "string" + } + } + }, + { + "properties": { + "type": { + "const": "secureString" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "string" + }, + "allowedValues": { + "items": { + "type": "string" + } + } + } + } + }, + { + "if": { + "oneOf": [ + { + "properties": { + "type": { + "const": "object" + } + } + }, + { + "properties": { + "type": { + "const": "secureObject" + } + } + } + ] + }, + "then": { + "properties": { + "defaultValue": { + "type": "object" + }, + "allowedValues": { + "items": { + "type": "object" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "int" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "integer" + }, + "allowedValues": { + "items": { + "type": "integer" + } + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "array" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "array" + } + } + } + }, + { + "if": { + "properties": { + "type": { + "const": "bool" + } + } + }, + "then": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "allowedValues": { + "items": { + "type": "boolean" + } + } + } + } + } + ] +} diff --git a/schemas/v3.0.2/config/document.resource.json b/schemas/v3.0.2/config/document.resource.json new file mode 100644 index 00000000..9a566998 --- /dev/null +++ b/schemas/v3.0.2/config/document.resource.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.resource.json", + "title": "DSC resource instance", + "description": "Defines an instance of a DSC resource in a configuration.", + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "dependsOn": { + "title": "Instance depends on", + "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$" + } + }, + "properties": { + "title": "Managed instance properties", + "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", + "type": "object" + } + } +} diff --git a/schemas/v3.0.2/definitions/commandArgs.json b/schemas/v3.0.2/definitions/commandArgs.json new file mode 100644 index 00000000..8650eafe --- /dev/null +++ b/schemas/v3.0.2/definitions/commandArgs.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json", + "title": "Executable Command Arguments", + "description": "The list of arguments to pass to the command. The arguments can be any number of strings. If you want to pass the JSON object representing the property bag for the resource to an argument, you can define a single item in the array as a JSON object, indicating the name of the argument with the `jsonInputArg` string property and whether the argument is mandatory for the command with the `mandatory` boolean property.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "title": "String argument", + "description": "Any item in the argument array can be a string representing a static argument to pass to the command." + }, + { + "type": "object", + "title": "JSON input argument", + "description": "Defines an argument for the command that accepts the JSON input object as a string. DSC passes the JSON input to the named argument when available. You can define the `mandatory` property to indicate whether DSC should always pass the argument to the command, even when there's no JSON input for the command. In that case, DSC passes an empty string to the JSON input argument. You can only define one JSON input argument per arguments array.", + "required": [ + "jsonInputArg" + ], + "unevaluatedProperties": false, + "properties": { + "jsonInputArg": { + "title": "JSON input argument name", + "description": "Defines the argument that accepts the JSON property bag for the resource as input.", + "type": "string" + }, + "mandatory": { + "title": "Mandatory argument", + "description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.", + "type": "boolean", + "default": false + } + } + } + ] + } +} diff --git a/schemas/v3.0.2/definitions/commandExecutable.json b/schemas/v3.0.2/definitions/commandExecutable.json new file mode 100644 index 00000000..b48ed542 --- /dev/null +++ b/schemas/v3.0.2/definitions/commandExecutable.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json", + "title": "Executable Command Name", + "description": "The name of the command to run.", + "type": "string" +} diff --git a/schemas/v3.0.2/definitions/hadErrors.json b/schemas/v3.0.2/definitions/hadErrors.json new file mode 100644 index 00000000..b961b1e4 --- /dev/null +++ b/schemas/v3.0.2/definitions/hadErrors.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json", + "title": "Had Errors", + "description": "Indicates whether any of the DSC resources returned a non-zero exit code.", + "type": "boolean" +} diff --git a/schemas/v3.0.2/definitions/inputKind.json b/schemas/v3.0.2/definitions/inputKind.json new file mode 100644 index 00000000..4f0d5783 --- /dev/null +++ b/schemas/v3.0.2/definitions/inputKind.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json", + "title": "Executable Command Input Type", + "description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.", + "type": "string", + "enum": [ + "env", + "stdin" + ] +} diff --git a/schemas/v3.0.2/definitions/instanceName.json b/schemas/v3.0.2/definitions/instanceName.json new file mode 100644 index 00000000..999d3c26 --- /dev/null +++ b/schemas/v3.0.2/definitions/instanceName.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json", + "title": "Instance name", + "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", + "type": "string", + "pattern": "^[a-zA-Z0-9 ]+$", + "minLength": 1 +} diff --git a/schemas/v3.0.2/definitions/message.json b/schemas/v3.0.2/definitions/message.json new file mode 100644 index 00000000..d840a690 --- /dev/null +++ b/schemas/v3.0.2/definitions/message.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json", + "title": "Message", + "description": "A message emitted by a DSC resource with associated metadata.", + "type": "object", + "required": [ + "name", + "type", + "message", + "level" + ], + "properties": { + "name": { + "title": "Message source instance name", + "description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.", + "type": "string" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "message": { + "title": "Message content", + "description": "The actual content of the message as emitted by the DSC resource.", + "type": "string", + "minLength": 1 + }, + "level": { + "title": "Message level", + "description": "Indicates the severity of the message.", + "type": "string", + "enum": [ + "error", + "warning", + "information" + ] + } + } +} diff --git a/schemas/v3.0.2/definitions/messages.json b/schemas/v3.0.2/definitions/messages.json new file mode 100644 index 00000000..b5b11f0f --- /dev/null +++ b/schemas/v3.0.2/definitions/messages.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json", + "title": "Messages", + "description": "A list of structured messages emitted by the DSC resources during an operation.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/message.json" + } +} diff --git a/schemas/v3.0.2/definitions/parameters/dataTypes.json b/schemas/v3.0.2/definitions/parameters/dataTypes.json new file mode 100644 index 00000000..be5221e0 --- /dev/null +++ b/schemas/v3.0.2/definitions/parameters/dataTypes.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/dataTypes.json", + "title": "Data Types", + "description": "Defines the data type for the parameter value.", + "type": "string", + "enum": [ + "string", + "secureString", + "int", + "bool", + "object", + "secureObject", + "array" + ] +} diff --git a/schemas/v3.0.2/definitions/parameters/validValueTypes.json b/schemas/v3.0.2/definitions/parameters/validValueTypes.json new file mode 100644 index 00000000..5c6c004b --- /dev/null +++ b/schemas/v3.0.2/definitions/parameters/validValueTypes.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/parameters/validValueTypes.json", + "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", + "type": [ + "string", + "integer", + "object", + "array", + "boolean" + ] +} diff --git a/schemas/v3.0.2/definitions/resourceCapabilities.json b/schemas/v3.0.2/definitions/resourceCapabilities.json new file mode 100644 index 00000000..6aa4c06c --- /dev/null +++ b/schemas/v3.0.2/definitions/resourceCapabilities.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json", + "title": "Resource capabilities", + "description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "set", + "setHandlesExist", + "whatIf", + "test", + "delete", + "export", + "resolve" + ] + } +} diff --git a/schemas/v3.0.2/definitions/resourceKind.json b/schemas/v3.0.2/definitions/resourceKind.json new file mode 100644 index 00000000..a8b407f6 --- /dev/null +++ b/schemas/v3.0.2/definitions/resourceKind.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json", + "title": "Resource kind", + "description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.", + "type": "string", + "enum": [ + "resource", + "adapter", + "group", + "importer" + ] +} diff --git a/schemas/v3.0.2/definitions/resourceType.json b/schemas/v3.0.2/definitions/resourceType.json new file mode 100644 index 00000000..16ae060e --- /dev/null +++ b/schemas/v3.0.2/definitions/resourceType.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json", + "title": "DSC resource fully qualified type name", + "description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", + "type": "string", + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$" +} diff --git a/schemas/v3.0.2/definitions/returnKind.json b/schemas/v3.0.2/definitions/returnKind.json new file mode 100644 index 00000000..51ac638a --- /dev/null +++ b/schemas/v3.0.2/definitions/returnKind.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "title": "Return Kind", + "type": "string", + "enum": [ + "state", + "stateAndDiff" + ], + "$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves." +} diff --git a/schemas/v3.0.2/definitions/semver.json b/schemas/v3.0.2/definitions/semver.json new file mode 100644 index 00000000..a9597339 --- /dev/null +++ b/schemas/v3.0.2/definitions/semver.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json", + "type": "string", + "title": "Semantic Version", + "description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n", + "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-]+)*))?$", + "$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n" +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/context.json b/schemas/v3.0.2/metadata/Microsoft.DSC/context.json new file mode 100644 index 00000000..a70cd16a --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/context.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/context.json", + "title": "Operation context", + "description": "Defines whether the operation was for a configuration or a resource. If the value for this metadata property is `configuration`, DSC was run through the `dsc config` command. If the value is `resource`, DSC was run with the `dsc resource` command.", + "type": "string", + "enum": [ + "resource", + "configuration" + ] +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json b/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json new file mode 100644 index 00000000..7b559474 --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json", + "title": "Duration", + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", + "type": "string", + "format": "duration" +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json b/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json new file mode 100644 index 00000000..dbfe9344 --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json", + "title": "Start date and time", + "description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json b/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json new file mode 100644 index 00000000..8f4b4dbf --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json", + "title": "Execution type", + "description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.", + "type": "string", + "enum": [ + "actual", + "whatIf" + ] +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json b/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json new file mode 100644 index 00000000..d13f40c3 --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json", + "title": "Operation", + "description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.", + "type": "string", + "enum": [ + "get", + "set", + "test", + "export" + ] +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json b/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json new file mode 100644 index 00000000..df7f318f --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json", + "title": "Security context", + "description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.", + "type": "string", + "enum": [ + "current", + "elevated", + "restricted" + ] +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json b/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json new file mode 100644 index 00000000..d91f3dfa --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json", + "title": "Start date and time", + "description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.", + "type": "string", + "format": "date-time" +} diff --git a/schemas/v3.0.2/metadata/Microsoft.DSC/version.json b/schemas/v3.0.2/metadata/Microsoft.DSC/version.json new file mode 100644 index 00000000..7a292f2f --- /dev/null +++ b/schemas/v3.0.2/metadata/Microsoft.DSC/version.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json", + "title": "DSC Version", + "description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" +} diff --git a/schemas/v3.0.2/metadata/configurationDocumentResult.json b/schemas/v3.0.2/metadata/configurationDocumentResult.json new file mode 100644 index 00000000..758dfa02 --- /dev/null +++ b/schemas/v3.0.2/metadata/configurationDocumentResult.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json", + "title": "Configuration result metadata", + "description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.", + "type": "object", + "required": [ + "version", + "operation", + "executionType", + "startDatetime", + "endDatetime", + "duration", + "securityContext" + ], + "properties": { + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/version.json" + }, + "operation": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/operation.json" + }, + "executionType": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/executionType.json" + }, + "startDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/startDatetime.json" + }, + "endDatetime": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/endDatetime.json" + }, + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + }, + "securityContext": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/securityContext.json" + } + } + } + } +} diff --git a/schemas/v3.0.2/metadata/resourceInstanceResult.json b/schemas/v3.0.2/metadata/resourceInstanceResult.json new file mode 100644 index 00000000..23bed4ab --- /dev/null +++ b/schemas/v3.0.2/metadata/resourceInstanceResult.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json", + "title": "Resource instance result metadata", + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", + "type": "object", + "required": [ + "Microsoft.DSC" + ], + "properties": { + "Microsoft.DSC": { + "title": "DSC context metadata", + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/Microsoft.DSC/duration.json" + } + } + } + } +} diff --git a/schemas/v3.0.2/outputs/config/get.json b/schemas/v3.0.2/outputs/config/get.json new file mode 100644 index 00000000..5b6f33a4 --- /dev/null +++ b/schemas/v3.0.2/outputs/config/get.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/get.json", + "title": "Result for `dsc config get` command", + "description": "Represents the data structure returned by the `dsc config get` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `get` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/config/set.json b/schemas/v3.0.2/outputs/config/set.json new file mode 100644 index 00000000..59ea0662 --- /dev/null +++ b/schemas/v3.0.2/outputs/config/set.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/set.json", + "title": "Result for `dsc config set` command", + "description": "Represents the data structure returned by the `dsc config set` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `set` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/config/test.json b/schemas/v3.0.2/outputs/config/test.json new file mode 100644 index 00000000..b6989e5f --- /dev/null +++ b/schemas/v3.0.2/outputs/config/test.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/test.json", + "title": "Result for `dsc config test` command", + "description": "Represents the data structure returned by the `dsc config test` command.", + "type": "object", + "required": [ + "metadata", + "results", + "messages", + "hadErrors" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/configurationDocumentResult.json" + }, + "results": { + "title": "Results", + "description": "The results of the `test` method for every DSC resource instance in the DSC configuration document with the instance's name and type.", + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + }, + "messages": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/messages.json" + }, + "hadErrors": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/hadErrors.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/get.full.json b/schemas/v3.0.2/outputs/resource/get.full.json new file mode 100644 index 00000000..3f881b21 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/get.full.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json", + "title": "dsc resource get result (full)", + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/get.json b/schemas/v3.0.2/outputs/resource/get.json new file mode 100644 index 00000000..46f761be --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/get.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.full.json" + } + } + ] +} diff --git a/schemas/v3.0.2/outputs/resource/get.simple.json b/schemas/v3.0.2/outputs/resource/get.simple.json new file mode 100644 index 00000000..870e25a2 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/get.simple.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.simple.json", + "title": "dsc resource get result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/list.json b/schemas/v3.0.2/outputs/resource/list.json new file mode 100644 index 00000000..abb7cd0b --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/list.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/list.json", + "title": "dsc resource list result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource list` command.", + "type": "object", + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "capabilities": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json" + }, + "description": { + "title": "Resource description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the DSC resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the DSC resource on the file system.", + "type": "string" + }, + "implementedAs": { + "title": "Implemented as", + "description": "Indicates how the DSC resource was implemented.", + "oneOf": [ + { + "title": "Standard implementation", + "description": "Indicates that the DSC resource is implemented as one of the standard implementations built into DSC.", + "type": "string", + "enum": [ + "command" + ] + }, + { + "title": "Custom implementation", + "description": "Indicates that the DSC resource uses a custom implementation. Only adapted resources define this value.", + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "title": "Custom implementation name", + "description": "The name of the custom implementation. This name is determined by the resource adapter.", + "type": "string" + } + } + } + ] + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the DSC resource.", + "type": [ + "string", + "null" + ] + }, + "properties": { + "title": "Properties", + "description": "Defines the DSC resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required DSC resource adapter", + "description": "Defines the fully qualified type name of the DSC resource adapter the DSC resource depends on.", + "oneOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + { + "type": "null" + } + ] + }, + "manifest": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/schema.json b/schemas/v3.0.2/outputs/resource/schema.json new file mode 100644 index 00000000..ee31a98d --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.", + "type": "object" +} diff --git a/schemas/v3.0.2/outputs/resource/set.full.json b/schemas/v3.0.2/outputs/resource/set.full.json new file mode 100644 index 00000000..3d9caa98 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/set.full.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json", + "title": "dsc resource set result (full)", + "description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/set.json b/schemas/v3.0.2/outputs/resource/set.json new file mode 100644 index 00000000..b4715109 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/set.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/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. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.full.json" + } + } + ] +} diff --git a/schemas/v3.0.2/outputs/resource/set.simple.json b/schemas/v3.0.2/outputs/resource/set.simple.json new file mode 100644 index 00000000..2ffa7ba6 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/set.simple.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.simple.json", + "title": "dsc resource set result (simple)", + "description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/test.full.json b/schemas/v3.0.2/outputs/resource/test.full.json new file mode 100644 index 00000000..2c792a8d --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/test.full.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json", + "title": "dsc resource test result (full)", + "description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.", + "type": "object", + "required": [ + "metadata", + "name", + "result", + "type" + ], + "properties": { + "metadata": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/metadata/resourceInstanceResult.json" + }, + "name": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/instanceName.json" + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "result": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json" + } + } +} diff --git a/schemas/v3.0.2/outputs/resource/test.json b/schemas/v3.0.2/outputs/resource/test.json new file mode 100644 index 00000000..e8b1fc30 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/test.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json", + "title": "dsc resource test result", + "description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.", + "anyOf": [ + { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json" + }, + { + "type": "array", + "items": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.full.json" + } + } + ] +} diff --git a/schemas/v3.0.2/outputs/resource/test.simple.json b/schemas/v3.0.2/outputs/resource/test.simple.json new file mode 100644 index 00000000..0a2298d0 --- /dev/null +++ b/schemas/v3.0.2/outputs/resource/test.simple.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.simple.json", + "title": "dsc resource test result (simple)", + "description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", + "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" + } + } + } +} diff --git a/schemas/v3.0.2/outputs/schema.json b/schemas/v3.0.2/outputs/schema.json new file mode 100644 index 00000000..2f7e5c4d --- /dev/null +++ b/schemas/v3.0.2/outputs/schema.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/schema.json", + "title": "DSC resource schema result", + "description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.", + "type": "object" +} diff --git a/schemas/v3.0.2/resource/manifest.adapter.json b/schemas/v3.0.2/resource/manifest.adapter.json new file mode 100644 index 00000000..711ac60f --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.adapter.json @@ -0,0 +1,58 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json", + "title": "Adapter", + "description": "Defines the DSC resource as a DSC resource adapter. A DSC resource adapter enables users to manage resources that don't have their own manifests with DSC.", + "type": "object", + "required": [ + "list", + "config" + ], + "properties": { + "list": { + "title": "List Command", + "description": "Defines how DSC must call the DSC resource adapter to list its supported DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the list of supported DSC resources." + } + } + }, + "config": { + "title": "Expected Configuration", + "description": "Defines whether the adapter expects to receive a full and unprocessed configuration as a single JSON blob over stdin or a sequence of JSON Lines for each child resource's configurations.", + "type": "string", + "enum": [ + "full", + "sequence" + ] + } + }, + "examples": [ + { + "config": "full", + "list": { + "executable": "pwsh", + "args": [ + "-NoLogo", + "-NonInteractive", + "-NoProfile", + "-Command", + "./powershellgroup.resource.ps1 List" + ] + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.delete.json b/schemas/v3.0.2/resource/manifest.delete.json new file mode 100644 index 00000000..7b9705a7 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.delete.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json", + "title": "Delete method", + "description": "Defines how DSC must call the DSC resource to delete an instance. Define this method for resources as an alternative to handling the `_exist` property in a `set` operation, which can lead to highly complex code. If the `set` operation for the resource is able to handle deleting an instance when `_exist` is `false`, set the `handlesExist` property of the set method definition to `true` instead.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.export.json b/schemas/v3.0.2/resource/manifest.export.json new file mode 100644 index 00000000..966b4de4 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.export.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json", + "title": "Export Method", + "description": "Defines how DSC must call the DSC resource to get the current state of every instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.get.json b/schemas/v3.0.2/resource/manifest.get.json new file mode 100644 index 00000000..171ea3d4 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.get.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json", + "title": "Get Method", + "description": "Defines how DSC must call the DSC resource to get the current state of an instance.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.json b/schemas/v3.0.2/resource/manifest.json new file mode 100644 index 00000000..c28967c7 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.json @@ -0,0 +1,176 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "title": "DSC resource manifest", + "description": "Defines the information DSC and integrating require to process and call a DSC command resource.", + "type": "object", + "required": [ + "$schema", + "type", + "version" + ], + "properties": { + "$schema": { + "title": "Manifest Schema", + "description": "This property must be the canonical URL of the Command-based DSC resource Manifest schema that the manifest is implemented for.", + "type": "string", + "format": "uri", + "enum": [ + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" + ] + }, + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "version": { + "title": "Resource Semantic Version", + "description": "The semantic version (semver) of the DSC resource. This version identifies the DSC resource, not the version of the application it manages.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "description": { + "title": "Resource Description", + "description": "A short synopsis of the DSC resource's purpose.", + "type": "string" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "tags": { + "title": "Tags", + "description": "Defines a list of searchable terms for the resource.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "get": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.get.json" + }, + "set": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json" + }, + "whatIf": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json" + }, + "test": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json" + }, + "delete": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.delete.json" + }, + "export": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.export.json" + }, + "validate": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json" + }, + "resolve": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json" + }, + "adapter": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.adapter.json" + }, + "exitCodes": { + "title": "Exit Codes", + "description": "This property defines a map of valid exit codes for the DSC resource. DSC always interprets exit code `0` as a successful operation and any other exit code as an error. Use this property to indicate human-readable semantic meanings for the DSC resource's exit codes.", + "type": "object", + "propertyNames": { + "pattern": "^-?[0-9]+$" + }, + "patternProperties": { + "^-?[0-9]+$": { + "type": "string" + } + }, + "unevaluatedProperties": false, + "default": { + "0": "Success", + "1": "Error" + }, + "examples": [ + { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + } + ] + }, + "schema": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json" + } + }, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "adapter" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "adapter" + ] + } + }, + { + "if": { + "properties": { + "kind": { + "const": "importer" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "required": [ + "resolve" + ] + }, + "else": { + "required": [ + "get" + ] + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.resolve.json b/schemas/v3.0.2/resource/manifest.resolve.json new file mode 100644 index 00000000..2d2996a5 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.resolve.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.resolve.json", + "title": "Resolve method", + "description": "Defines how DSC must call the DSC resource to resolve a nested configuration document from an external source. Define this method for importer resources where the resource kind is set to `importer`.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.schema.json b/schemas/v3.0.2/resource/manifest.schema.json new file mode 100644 index 00000000..024917d2 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.schema.json @@ -0,0 +1,195 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.schema.json", + "title": "Instance Schema", + "description": "Defines how DSC must validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "command" + ] + }, + { + "required": [ + "embedded" + ] + } + ], + "properties": { + "command": { + "title": "Instance Schema Command", + "description": "Defines how DSC must call the DSC resource to get the JSON Schema for validating a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command arguments", + "description": "Defines the list of arguments to pass to the command to return the JSON Schema for the resource." + } + } + }, + "embedded": { + "title": "Embedded Instance Schema", + "description": "Defines the JSON Schema DSC must use to validate a JSON blob representing an instance of the DSC resource.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ], + "properties": { + "type": { + "title": "Instance Type", + "description": "Defines the JSON type for an instance of the DSC resource. DSC resource instances always have the `object` type.", + "const": "object" + }, + "$schema": { + "title": "DSC resource instance schema dialect", + "description": "Defines which dialect of JSON Schema the DSC resource is using to validate instances.", + "type": "string", + "format": "uri-reference", + "enum": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ] + }, + "$id": { + "title": "DSC resource instance schema ID", + "description": "Defines the unique ID for the DSC resource's instance schema. If the instance schema is published to its own public URI, set this keyword to that URI.", + "type": "string", + "format": "uri-reference" + }, + "properties": { + "title": "Instance Properties", + "description": "Defines the properties that DSC can retrieve and manage for the resource's instances. This keyword must define at least one property as a key-value pair. The key is the property's name. The value is a subschema that validates the property.", + "type": "object", + "minProperties": 1, + "unevaluatedProperties": { + "anyOf": [ + { + "$ref": "https://json-schema.org/draft/2020-12/schema" + }, + { + "$ref": "https://json-schema.org/draft/2019-09/schema" + }, + { + "$ref": "http://json-schema.org/draft-07/schema#" + } + ] + }, + "additionalProperties": {}, + "properties": { + "_exist": { + "title": "Standard Property: _exist", + "description": "Indicates that the DSC resource uses the standard `_exist` property to specify whether an instance should exist as a boolean value that defaults to `true`.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json" + } + }, + "_inDesiredState": { + "title": "Standard Property: _inDesiredState", + "description": "Indicates that the DSC resource returns this value for it's own `test` method. This read-only property is mandatory when the manifest defines the `test` property. It shouldn't be included if the DSC resource relies on DSC's synthetic testing.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json" + } + }, + "_purge": { + "title": "Standard Property: _purge", + "description": "Indicates that the DSC resource uses the standard `_purge` property to specify whether the DSC resource should remove all non-specified members when it manages an array of members or values.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json" + } + }, + "_rebootRequested": { + "title": "Standard property: _rebootRequested", + "description": "Indicates whether a resource instance requires a reboot after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest.", + "const": { + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json" + } + } + } + } + } + } + }, + "examples": [ + { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + }, + { + "embedded": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "OSInfo", + "type": "object", + "required": [], + "properties": { + "$id": { + "type": "string" + }, + "architecture": { + "type": [ + "string", + "null" + ] + }, + "bitness": { + "$ref": "#/definitions/Bitness" + }, + "codename": { + "type": [ + "string", + "null" + ] + }, + "edition": { + "type": [ + "string", + "null" + ] + }, + "family": { + "$ref": "#/definitions/Family" + }, + "version": { + "type": "string" + } + }, + "additionalProperties": false, + "definitions": { + "Bitness": { + "type": "string", + "enum": [ + "32", + "64", + "unknown" + ] + }, + "Family": { + "type": "string", + "enum": [ + "Linux", + "macOS", + "Windows" + ] + } + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.set.json b/schemas/v3.0.2/resource/manifest.set.json new file mode 100644 index 00000000..fcb88f1f --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.set.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.set.json", + "title": "Set Method", + "description": "Defines how DSC must call the DSC resource to set the desired state of an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set` command. Set this value to `true` if the DSC resource tests input before modifying system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's state after the set operation or the state and an array of the properties the DSC resource modified.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.test.json b/schemas/v3.0.2/resource/manifest.test.json new file mode 100644 index 00000000..e2ae494d --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.test.json @@ -0,0 +1,73 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.test.json", + "title": "Test Method", + "description": "Defines how DSC must call the DSC resource to test if an instance is in the desired state and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "return": { + "title": "Test Command Return Type", + "description": "Defines whether the command returns a JSON blob of the DSC resource's current state or the state and an array of the properties that are out of the desired state.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json", + "default": "state" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.validate.json b/schemas/v3.0.2/resource/manifest.validate.json new file mode 100644 index 00000000..848926a8 --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.validate.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.validate.json", + "title": "Validate Method", + "description": "Defines how DSC must call the DSC resource to validate the state of an instance. This method is mandatory for DSC group resources. It's ignored for all other DSC resources.", + "type": "object", + "required": [ + "executable" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/manifest.whatIf.json b/schemas/v3.0.2/resource/manifest.whatIf.json new file mode 100644 index 00000000..7211f4dc --- /dev/null +++ b/schemas/v3.0.2/resource/manifest.whatIf.json @@ -0,0 +1,84 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.whatIf.json", + "title": "What-if method", + "description": "Defines how DSC must call the DSC resource to indicate whether and how the set command will modify an instance and how to process the output from the DSC resource.", + "type": "object", + "required": [ + "executable", + "return" + ], + "properties": { + "executable": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandExecutable.json" + }, + "args": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/commandArgs.json" + }, + "input": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/inputKind.json" + }, + "implementsPretest": { + "title": "Resource performs pre-test", + "description": "Defines whether the DSC resource performs its own test to ensure idempotency when calling the `set --what-if` command. Set this value to `true` if the DSC resource tests input before processing how it will modify system state.", + "type": "boolean", + "default": false + }, + "handlesExist": { + "title": "Resource handles `_exist` property", + "description": "Defines whether the DSC resource has its own built-in handling for the `_exist` common property. Set this value to `true` if the DSC resource handles instance deletion internally when receiving a `set --what-if` command where the instance defines the `_exist` property as `false`.", + "type": "boolean", + "default": false + }, + "return": { + "description": "Defines whether the command returns a JSON blob of the DSC resource's expected state after a set operation in what-if mode or the state and an array of the properties the DSC resource would modify.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/returnKind.json" + } + }, + "oneOf": [ + { + "required": [ + "input" + ], + "not": { + "properties": { + "args": { + "contains": { + "type": "object" + } + } + } + } + }, + { + "not": { + "required": [ + "input" + ] + }, + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + }, + { + "required": [ + "input" + ], + "properties": { + "args": { + "contains": { + "type": "object" + }, + "minContains": 1, + "maxContains": 1 + } + } + } + ] +} diff --git a/schemas/v3.0.2/resource/properties/exist.json b/schemas/v3.0.2/resource/properties/exist.json new file mode 100644 index 00000000..3ecb194a --- /dev/null +++ b/schemas/v3.0.2/resource/properties/exist.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json", + "title": "Instance should exist", + "description": "Indicates whether the DSC resource instance should exist.", + "type": "boolean", + "default": true, + "enum": [ + false, + true + ] +} diff --git a/schemas/v3.0.2/resource/properties/inDesiredState.json b/schemas/v3.0.2/resource/properties/inDesiredState.json new file mode 100644 index 00000000..95e2c4a0 --- /dev/null +++ b/schemas/v3.0.2/resource/properties/inDesiredState.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json", + "title": "Instance is in the Desired State", + "description": "Indicates whether the instance is in the desired state. This property is only returned by the `test` method.", + "type": [ + "boolean", + "null" + ], + "readOnly": true +} diff --git a/schemas/v3.0.2/resource/properties/purge.json b/schemas/v3.0.2/resource/properties/purge.json new file mode 100644 index 00000000..23b9dfbc --- /dev/null +++ b/schemas/v3.0.2/resource/properties/purge.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json", + "title": "Purge", + "description": "Indicates that only the components described in the DSC resource should exist. If other components exist, the DSC resource is out of the desired state. When enforcing desired state, the DSC resource removes unmanaged components.", + "type": [ + "boolean", + "null" + ], + "writeOnly": true +} diff --git a/schemas/v3.0.2/resource/properties/rebootRequested.json b/schemas/v3.0.2/resource/properties/rebootRequested.json new file mode 100644 index 00000000..b27297e8 --- /dev/null +++ b/schemas/v3.0.2/resource/properties/rebootRequested.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json", + "title": "Reboot Requested", + "description": "Indicates that the set operation requires a reboot before it's fully complete.", + "type": [ + "boolean", + "null" + ], + "readOnly": true +} diff --git a/schemas/v3.0.2/resource/stdout/delete.json b/schemas/v3.0.2/resource/stdout/delete.json new file mode 100644 index 00000000..26776509 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/delete.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/delete.json", + "title": "Delete resource operation stdout", + "description": "DSC does not expect the **Delete** operation for a resource to return any JSON to stdout.", + "type": "null" +} diff --git a/schemas/v3.0.2/resource/stdout/export.json b/schemas/v3.0.2/resource/stdout/export.json new file mode 100644 index 00000000..d5311a12 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/export.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/export.json", + "title": "Export resource operation stdout", + "description": "Represents the actual state of a resource instance in DSC. DSC expects every JSON Line emitted to stdout for the **Export** operation to adhere to this schema.", + "type": "object" +} diff --git a/schemas/v3.0.2/resource/stdout/get.json b/schemas/v3.0.2/resource/stdout/get.json new file mode 100644 index 00000000..84e94e10 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/get.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/get.json", + "title": "Get resource operation stdout", + "description": "Represents the actual state of a resource instance in DSC. DSC expects the JSON Line emitted to stdout for the **Get** operation to adhere to this schema.", + "type": "object" +} diff --git a/schemas/v3.0.2/resource/stdout/list.json b/schemas/v3.0.2/resource/stdout/list.json new file mode 100644 index 00000000..1d8df6f4 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/list.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/list.json", + "title": "List resource operation stdout", + "description": "Defines the representation of an adapted resource in DSC. DSC expects every JSON Line emitted to stdout for the **List** operation to adhere to this schema.", + "type": "object", + "required": [ + "type", + "kind", + "version", + "capabilities", + "path", + "directory", + "implementedAs", + "properties", + "requireAdapter" + ], + "properties": { + "type": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + }, + "kind": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceKind.json" + }, + "version": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/semver.json" + }, + "capabilities": { + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceCapabilities.json" + }, + "path": { + "title": "Path", + "description": "Indicates the path to the adapted resource on the file system.", + "type": "string" + }, + "directory": { + "title": "Directory", + "description": "Indicates the path to the folder containing the adapted resource on the file system." + }, + "implementedAs": { + "title": "Custom implementation name", + "description": "Indicates that the adapted resource uses a custom implementation. The name can be used to distinguish between different implementations for the adapted resources.", + "type": "string" + }, + "author": { + "title": "Author", + "description": "Indicates the name of the person or organization that developed and maintains the adapted Resource.", + "type": [ + "string", + "null" + ], + "pattern": "^\\w+( \\w+)*" + }, + "properties": { + "title": "Properties", + "description": "Defines the adapted resource's property names.", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w+$" + } + }, + "requireAdapter": { + "title": "Required adapter", + "description": "Defines the fully qualified type name of the adapter that the adapted resource depends on. An adapter should always set this value to its own fully qualified resource type name.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/definitions/resourceType.json" + } + } +} diff --git a/schemas/v3.0.2/resource/stdout/resolve.json b/schemas/v3.0.2/resource/stdout/resolve.json new file mode 100644 index 00000000..0f307f45 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/resolve.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/resolve.json", + "title": "Resolve resource operation stdout", + "description": "Defines the representation of a resolved configuration document. DSC expects the JSON Line emitted to stdout for the **Resolve** operation to adhere to this schema.", + "type": "object", + "required": [ + "configuration" + ], + "properties": { + "configuration": { + "title": "Resolved configuration document", + "description": "Defines the resolved configuration document.", + "$ref": "/PowerShell/DSC/main/schemas/v3.0.2/config/document.json" + }, + "parameters": { + "title": "Resolved parameters", + "description": "The `parameters` property defines the set of resolved parameter values for the resolved configuration document.", + "type": "object" + } + } +} diff --git a/schemas/v3.0.2/resource/stdout/schema.json b/schemas/v3.0.2/resource/stdout/schema.json new file mode 100644 index 00000000..84b8280e --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/schema.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/schema.json", + "title": "Schema resource command stdout", + "description": "Represents the JSON Schema that validates instances of the resource. DSC expects a resource that defines the `schema.command` field in its resource manifest to return this value for that command.", + "type": "object", + "required": [ + "$schema", + "type", + "properties" + ] +} diff --git a/schemas/v3.0.2/resource/stdout/set.json b/schemas/v3.0.2/resource/stdout/set.json new file mode 100644 index 00000000..fab4f334 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/set.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/set.json", + "title": "Set resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Set** operation.", + "oneOf": [ + { + "title": "Null output", + "description": "When a command resource doesn't define `set.return` in its resource manifest, DSC doesn't expect the resource to emit any JSON to stdout for the **Set** operation.", + "type": "null" + }, + { + "title": "state output", + "description": "When a resource defines `set.return` in its manifest as `state` or `stateAndDiff`, DSC expects the resource to emit a JSON Line to stdout representing the actual state of the resource instance after the **Set** operation changes the system.", + "type": "object" + }, + { + "title": "diff output", + "description": "When a command resource defines `set.return` in its manifest as `stateAndDiff`, DSC expects the resource to emit a second JSON Line to stdout representing the names of the resource properties that the operation changed on the system.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + ] +} diff --git a/schemas/v3.0.2/resource/stdout/test.json b/schemas/v3.0.2/resource/stdout/test.json new file mode 100644 index 00000000..6aca6695 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/test.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/test.json", + "title": "Test resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Test** operation.", + "oneOf": [ + { + "title": "state output", + "description": "For the **Test** operation, DSC always expects the resource to emit a JSON Line to stdout representing the actual state of the resource instance with the `_inDesiredState` canonical resource property included in the returned object.", + "type": "object" + }, + { + "title": "diff output", + "description": "When a command resource defines `test.return` in its manifest as `stateAndDiff`, DSC expects the resource to emit a second JSON Line to stdout representing the names of the resource properties that the operation changed on the system.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + ] +} diff --git a/schemas/v3.0.2/resource/stdout/validate.json b/schemas/v3.0.2/resource/stdout/validate.json new file mode 100644 index 00000000..de7f1368 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/validate.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/validate.json", + "title": "Validate resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Validate** operation.", + "type": "object", + "required": [ + "valid" + ], + "properties": { + "valid": { + "title": "Instance validity", + "description": "Indicates whether the instance is valid for the resource." + }, + "reason": { + "title": "Reason instance is invalid", + "description": "Describes how and why the instance is invalid for the resource." + } + } +} diff --git a/schemas/v3.0.2/resource/stdout/whatIf.json b/schemas/v3.0.2/resource/stdout/whatIf.json new file mode 100644 index 00000000..0073ebe3 --- /dev/null +++ b/schemas/v3.0.2/resource/stdout/whatIf.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/stdout/whatIf.json", + "title": "Set (what-if mode) resource operation stdout", + "description": "Defines the JSON DSC expects a resource to emit to stdout for the **Set** operation in what-if mode.", + "oneOf": [ + { + "title": "state output", + "description": "When a resource defines `whatIf.return` in its manifest as `state` or `stateAndDiff`, DSC expects the resource to emit a JSON Line to stdout representing the predicted actual state of the resource instance after the **Set** operation changes the system.", + "type": "object" + }, + { + "title": "diff output", + "description": "When a command resource defines `whatIf.return` in its manifest as `stateAndDiff`, DSC expects the resource to emit a second JSON Line to stdout representing the names of the resource properties that the operation changed on the system.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + ] +} diff --git a/schemas/v3.0/bundled/config/document.json b/schemas/v3.0/bundled/config/document.json index 5ce5b6d7..fa929500 100644 --- a/schemas/v3.0/bundled/config/document.json +++ b/schemas/v3.0/bundled/config/document.json @@ -24,6 +24,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", @@ -32,7 +38,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ] }, "parameters": { diff --git a/schemas/v3.0/bundled/config/document.vscode.json b/schemas/v3.0/bundled/config/document.vscode.json index 901f4864..c919523e 100644 --- a/schemas/v3.0/bundled/config/document.vscode.json +++ b/schemas/v3.0/bundled/config/document.vscode.json @@ -25,6 +25,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", @@ -33,7 +39,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the URI that resolves to the version of this schema that the\ndocument adheres to. DSC uses this property when validating and processing the configuration\ndocument.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../config/document.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n \n```yaml\n.../bundled/config/document.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/config/document.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ @@ -46,6 +58,12 @@ "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", @@ -54,7 +72,13 @@ "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "parameters": { diff --git a/schemas/v3.0/bundled/outputs/resource/list.json b/schemas/v3.0/bundled/outputs/resource/list.json index 8bc72b5e..d3eda0a5 100644 --- a/schemas/v3.0/bundled/outputs/resource/list.json +++ b/schemas/v3.0/bundled/outputs/resource/list.json @@ -172,6 +172,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -180,7 +186,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ] }, "type": { diff --git a/schemas/v3.0/bundled/outputs/resource/list.vscode.json b/schemas/v3.0/bundled/outputs/resource/list.vscode.json index c51c5ee4..e67961f4 100644 --- a/schemas/v3.0/bundled/outputs/resource/list.vscode.json +++ b/schemas/v3.0/bundled/outputs/resource/list.vscode.json @@ -515,6 +515,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -523,7 +529,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ @@ -535,7 +547,13 @@ "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", @@ -544,7 +562,13 @@ "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "type": { diff --git a/schemas/v3.0/bundled/resource/manifest.json b/schemas/v3.0/bundled/resource/manifest.json index c74cbdb7..3db08645 100644 --- a/schemas/v3.0/bundled/resource/manifest.json +++ b/schemas/v3.0/bundled/resource/manifest.json @@ -25,6 +25,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -33,7 +39,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ] }, "type": { diff --git a/schemas/v3.0/bundled/resource/manifest.vscode.json b/schemas/v3.0/bundled/resource/manifest.vscode.json index 0ec579fd..c535907f 100644 --- a/schemas/v3.0/bundled/resource/manifest.vscode.json +++ b/schemas/v3.0/bundled/resource/manifest.vscode.json @@ -249,6 +249,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -257,7 +263,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ @@ -269,7 +281,13 @@ "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", @@ -278,7 +296,13 @@ "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "type": { diff --git a/schemas/v3.0/config/document.json b/schemas/v3.0/config/document.json index 3186d806..8d1c10df 100644 --- a/schemas/v3.0/config/document.json +++ b/schemas/v3.0/config/document.json @@ -24,6 +24,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", @@ -32,7 +38,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ] }, "parameters": { diff --git a/schemas/v3.0/resource/manifest.json b/schemas/v3.0/resource/manifest.json index 1c5864fb..3f1c4c01 100644 --- a/schemas/v3.0/resource/manifest.json +++ b/schemas/v3.0/resource/manifest.json @@ -25,6 +25,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -33,7 +39,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ] }, "type": { diff --git a/schemas/v3/bundled/config/document.json b/schemas/v3/bundled/config/document.json index 4cc2c257..181f10f1 100644 --- a/schemas/v3/bundled/config/document.json +++ b/schemas/v3/bundled/config/document.json @@ -24,6 +24,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", @@ -32,7 +38,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ] }, "parameters": { diff --git a/schemas/v3/bundled/config/document.vscode.json b/schemas/v3/bundled/config/document.vscode.json index 644a99e9..de5a719c 100644 --- a/schemas/v3/bundled/config/document.vscode.json +++ b/schemas/v3/bundled/config/document.vscode.json @@ -25,6 +25,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", @@ -33,7 +39,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the URI that resolves to the version of this schema that the\ndocument adheres to. DSC uses this property when validating and processing the configuration\ndocument.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../config/document.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n \n```yaml\n.../bundled/config/document.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/config/document.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ @@ -46,6 +58,12 @@ "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", @@ -54,7 +72,13 @@ "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "parameters": { diff --git a/schemas/v3/bundled/outputs/resource/list.json b/schemas/v3/bundled/outputs/resource/list.json index 1d24c8bc..fdb6ea6c 100644 --- a/schemas/v3/bundled/outputs/resource/list.json +++ b/schemas/v3/bundled/outputs/resource/list.json @@ -172,6 +172,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -180,7 +186,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ] }, "type": { diff --git a/schemas/v3/bundled/outputs/resource/list.vscode.json b/schemas/v3/bundled/outputs/resource/list.vscode.json index 6fb4e669..2af4e5c6 100644 --- a/schemas/v3/bundled/outputs/resource/list.vscode.json +++ b/schemas/v3/bundled/outputs/resource/list.vscode.json @@ -515,6 +515,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -523,7 +529,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ @@ -535,7 +547,13 @@ "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", @@ -544,7 +562,13 @@ "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "type": { diff --git a/schemas/v3/bundled/resource/manifest.json b/schemas/v3/bundled/resource/manifest.json index fa5de584..ce1523ba 100644 --- a/schemas/v3/bundled/resource/manifest.json +++ b/schemas/v3/bundled/resource/manifest.json @@ -25,6 +25,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -33,7 +39,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ] }, "type": { diff --git a/schemas/v3/bundled/resource/manifest.vscode.json b/schemas/v3/bundled/resource/manifest.vscode.json index 099c80dd..1e659d78 100644 --- a/schemas/v3/bundled/resource/manifest.vscode.json +++ b/schemas/v3/bundled/resource/manifest.vscode.json @@ -249,6 +249,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -257,7 +263,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the canonical URI of this schema that the manifest validates\nagainst. This property is mandatory. DSC uses this value to validate the manifest against the\ncorrect JSON schema.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../resource/manifest.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n\n```yaml\n.../bundled/resource/manifest.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n> \n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/resource/manifest.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n> \n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/resource/manifest/root?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ @@ -269,7 +281,13 @@ "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3` schema. This URL points to the\n> enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", @@ -278,7 +296,13 @@ "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", - "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" + "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.0` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.1` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", + "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the resource manifest adheres to the `v3.0.2` schema. This URL points to\n> the enhanced authoring schema. This schema is much larger than the other schemas, as it\n> includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "type": { diff --git a/schemas/v3/config/document.json b/schemas/v3/config/document.json index f4b9ae90..9df1a1c5 100644 --- a/schemas/v3/config/document.json +++ b/schemas/v3/config/document.json @@ -24,6 +24,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", @@ -32,7 +38,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ] }, "parameters": { diff --git a/schemas/v3/resource/manifest.json b/schemas/v3/resource/manifest.json index 96ee7b74..bfc5465b 100644 --- a/schemas/v3/resource/manifest.json +++ b/schemas/v3/resource/manifest.json @@ -25,6 +25,12 @@ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json", + "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json", @@ -33,7 +39,13 @@ "https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json", - "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json" + "https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json", + "https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json", + "https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json" ] }, "type": {