Skip to content

Commit 10dbd4b

Browse files
(PowerShellGH-642) Update reference docs for v3 schemas
This change updates the reference documentation to align with the new schema URIs and the changes to the enumeration and struct casing.
1 parent f3e2cb8 commit 10dbd4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+248
-214
lines changed

docs/reference/cli/config/get.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc config get' command
3-
ms.date: 06/24/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: dsc config get
66
---
@@ -49,12 +49,12 @@ document saved as `example.dsc.config.yaml`.
4949

5050
```yaml
5151
# example.dsc.config.yaml
52-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
52+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
5353
resources:
5454
- name: Windows only
5555
type: Microsoft.DSC/Assertion
5656
properties:
57-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
57+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
5858
resources:
5959
- name: os
6060
type: Microsoft/OSInfo

docs/reference/cli/config/set.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc config set' command
3-
ms.date: 06/24/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: dsc config set
66
---
@@ -50,12 +50,12 @@ The command inspects the resource instances defined in the configuration documen
5050

5151
```yaml
5252
# example.dsc.config.yaml
53-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
53+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
5454
resources:
5555
- name: Windows only
5656
type: Microsoft.DSC/Assertion
5757
properties:
58-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
58+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
5959
resources:
6060
- name: os
6161
type: Microsoft/OSInfo

docs/reference/cli/config/test.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc config test' command
3-
ms.date: 06/24/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: dsc config test
66
---
@@ -49,12 +49,12 @@ resource instances defined in the configuration document saved as `example.dsc.c
4949

5050
```yaml
5151
# example.dsc.config.yaml
52-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
52+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
5353
resources:
5454
- name: Windows only
5555
type: Microsoft.DSC/Assertion
5656
properties:
57-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
57+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
5858
resources:
5959
- name: os
6060
type: Microsoft/OSInfo

docs/reference/cli/resource/list.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc resource list' command
3-
ms.date: 06/24/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: dsc resource list
66
---
@@ -309,24 +309,24 @@ a summary table for the returned resources. The summary table includes the follo
309309
displayed in the listed order:
310310

311311
- **Type** - The fully qualified type name of the resource.
312-
- **Kind** - Whether the resource is an `Adapter`, `Group`, or typical `Resource`. For more
313-
information, see [DSC Resource kind schema reference][03].
312+
- **Kind** - Whether the resource is an `adapter`, `group`, `importer`, or typical `Resource`. For
313+
more information, see [DSC Resource kind schema reference][03].
314314
- **Version** - The semantic version of the resource.
315315
- **Caps** - A display of the resource's [capabilities][04] as flags. The capabilities are
316316
displayed in the following order, using a `-` instead of the appropriate letter if the resource
317317
doesn't have a specific capability:
318318

319-
- `g` indicates that the resource has the [Get capability][05].
320-
- `s` indicates that the resource has the [Set capability][06]
321-
- `x` indicates that the resource has the [SetHandlesExist capability][07]
322-
- `w` indicates that the resource has the [WhatIf capability][08]
323-
- `t` indicates that the resource has the [Test capability][09]
324-
- `d` indicates that the resource has the [Delete capability][10]
325-
- `e` indicates that the resource has the [Export capability][11]
326-
- `r` indicates that the resource has the [Resolve capability][12]
319+
- `g` indicates that the resource has the [get capability][05].
320+
- `s` indicates that the resource has the [set capability][06]
321+
- `x` indicates that the resource has the [setHandlesExist capability][07]
322+
- `w` indicates that the resource has the [whatIf capability][08]
323+
- `t` indicates that the resource has the [test capability][09]
324+
- `d` indicates that the resource has the [delete capability][10]
325+
- `e` indicates that the resource has the [export capability][11]
326+
- `r` indicates that the resource has the [resolve capability][12]
327327

328328
For example, the `Microsoft.Windows/Registry` resource has the following capabilities: `gs--d-`,
329-
indicating it has the `Get`, `Set`, and `Delete` capabilities.
329+
indicating it has the `get`, `set`, and `delete` capabilities.
330330
- **RequireAdapter** - The fully qualified type name of the adapter resource that DSC uses to
331331
invoke the returned resource.
332332
- **Description** - The short description of the resource's purpose and usage.

docs/reference/cli/schema/command.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc schema' command
3-
ms.date: 06/24/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: dsc schema
66
---
@@ -26,6 +26,22 @@ integrating tool.
2626
The application uses these schemas to validate data internally when it's received or represent the
2727
output for one of the application's commands.
2828

29+
> [!NOTE]
30+
> Currently, the schemas returned by the `dsc schema` command and those published to GitHub are
31+
> not the same. The published schemas more fully describe and validate the data than the schemas
32+
> emitted by the command. The DSC team is working to canonicalize the schemas returned from the
33+
> command.
34+
>
35+
> Both the published schemas and those returned from this command correctly validate the data. The
36+
> schemas returned from this command are less strict than the published schemas. Even though data
37+
> validates against the schemas returned by this command, DSC may raise errors when processing the
38+
> data. For example, the returned schema for versions indicates that the valid value is a string -
39+
> but if you specify a string that isn't a semantic version, DSC raises an error. In that case, the
40+
> data passed the schema validation but was incorrect.
41+
>
42+
> Until the schemas are canonicalized, consider using the published schemas when indpendently
43+
> testing your configuration documents and resource manifests with a JSON Schema validation tool.
44+
2945
## Examples
3046

3147
### Example 1 - Retrieve the schema for the dsc resource get command result

docs/reference/schemas/config/functions/add.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'add' DSC configuration document function
3-
ms.date: 03/19/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: add
66
---
@@ -30,7 +30,7 @@ This example document shows how you can use the `add()` function to return the s
3030

3131
```yaml
3232
# add.example.1.dsc.config.yaml
33-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
33+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3434
resources:
3535
- name: Sum of 3 and 5
3636
type: Test/Echo
@@ -60,7 +60,7 @@ configuration functions that return integer values.
6060

6161
```yaml
6262
# add.example.2.dsc.config.yaml
63-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
63+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6464
resources:
6565
- name: Add nested function outputs
6666
type: Test/Echo

docs/reference/schemas/config/functions/base64.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'base64' DSC configuration document function
3-
ms.date: 01/17/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: base64
66
---
@@ -31,7 +31,7 @@ The configuration converts a basic string value with the `base64()` function.
3131

3232
```yaml
3333
# base64.example.1.dsc.config.yaml
34-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
34+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3535
resources:
3636
- name: Echo 'abc' in base64
3737
type: Test/Echo
@@ -61,7 +61,7 @@ strings `a`, `b`, and `c` into `abc` before returning the base64 representation.
6161

6262
```yaml
6363
# base64.example.2.dsc.config.yaml
64-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
64+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6565
resources:
6666
- name: Echo concatenated 'a', 'b', 'c' in base64
6767
type: Test/Echo

docs/reference/schemas/config/functions/concat.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'concat' DSC configuration document function
3-
ms.date: 01/17/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: concat
66
---
@@ -35,7 +35,7 @@ The configuration uses the `concat()` function to join the strings `abc` and `de
3535

3636
```yaml
3737
# concat.example.1.dsc.config.yaml
38-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
38+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3939
resources:
4040
- name: Echo 'abcdef'
4141
type: Test/Echo
@@ -64,7 +64,7 @@ The configuration uses the `concat()` function to return a combined array of str
6464

6565
```yaml
6666
# concat.example.2.dsc.config.yaml
67-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
67+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6868
resources:
6969
- name: Echo ['a', 'b', 'c', 'd', 'e', 'f']
7070
type: Test/Echo

docs/reference/schemas/config/functions/createArray.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'createArray' DSC configuration document function
3-
ms.date: 04/09/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: createArray
66
---
@@ -33,7 +33,7 @@ example synopsis
3333

3434
```yaml
3535
# createArray.example.1.dsc.config.yaml
36-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
36+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3737
resources:
3838
- name: Echo array of integers
3939
type: Test/Echo
@@ -66,7 +66,7 @@ sub-array contains only integers. The second sub-array contains only strings.
6666
6767
```yaml
6868
# createArray.example.2.dsc.config.yaml
69-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
69+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
7070
resources:
7171
- name: Create array of arrays
7272
type: Test/Echo
@@ -102,7 +102,7 @@ strings. It uses YAML's folded multiline string syntax to make the function more
102102
103103
```yaml
104104
# createArray.example.3.dsc.config.yaml
105-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
105+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
106106
resources:
107107
- name: Echo flattened array
108108
type: Test/Echo

docs/reference/schemas/config/functions/div.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'div' DSC configuration document function
3-
ms.date: 03/19/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: div
66
---
@@ -32,7 +32,7 @@ integers.
3232

3333
```yaml
3434
# div.example.1.dsc.config.yaml
35-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
35+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3636
resources:
3737
- name: Dividing integers
3838
type: Test/Echo
@@ -63,7 +63,7 @@ full integer value without the remainder. It doesn't round the result up to 3.
6363

6464
```yaml
6565
# div.example.2.dsc.config.yaml
66-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
66+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6767
resources:
6868
- name: Dividing nested functions
6969
type: Test/Echo

docs/reference/schemas/config/functions/envvar.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'envvar' DSC configuration document function
3-
ms.date: 03/01/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: envvar
66
---
@@ -35,7 +35,7 @@ This configuration echoes that folder with the `Test/Echo` resource.
3535

3636
```yaml
3737
# ./examples/envvar.example.1.dsc.config.yaml
38-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
38+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3939
resources:
4040
- name: Echo 'DSC_CONFIG_ROOT' in envvar
4141
type: Test/Echo

docs/reference/schemas/config/functions/int.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'int' DSC configuration document function
3-
ms.date: 06/13/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: int
66
---
@@ -31,7 +31,7 @@ This configuration returns an integer, converting the string value `'4.7'` to `4
3131

3232
```yaml
3333
# int.example.1.dsc.config.yaml
34-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
34+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3535
resources:
3636
- name: Echo integer value
3737
type: Test/Echo

docs/reference/schemas/config/functions/max.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'max' DSC configuration document function
3-
ms.date: 04/09/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: max
66
---
@@ -30,7 +30,7 @@ This configuration returns the largest number from a list of integers.
3030

3131
```yaml
3232
# max.example.1.dsc.config.yaml
33-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
33+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3434
resources:
3535
- name: Echo maximum value
3636
type: Test/Echo
@@ -61,7 +61,7 @@ function more readable.
6161
6262
```yaml
6363
# max.example.2.dsc.config.yaml
64-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
64+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6565
resources:
6666
- name: Echo integer array
6767
type: Test/Echo

docs/reference/schemas/config/functions/min.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'min' DSC configuration document function
3-
ms.date: 04/09/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: min
66
---
@@ -30,7 +30,7 @@ This configuration returns the smallest number from a list of integers.
3030

3131
```yaml
3232
# min.example.1.dsc.config.yaml
33-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
33+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3434
resources:
3535
- name: Echo minimum value
3636
type: Test/Echo
@@ -61,7 +61,7 @@ function more readable.
6161
6262
```yaml
6363
# min.example.2.dsc.config.yaml
64-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
64+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6565
resources:
6666
- name: Echo integer array
6767
type: Test/Echo

docs/reference/schemas/config/functions/mod.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Reference for the 'mod' DSC configuration document function
3-
ms.date: 03/19/2024
3+
ms.date: 02/28/2025
44
ms.topic: reference
55
title: mod
66
---
@@ -30,7 +30,7 @@ division for two integers.
3030

3131
```yaml
3232
# mod.example.1.dsc.config.yaml
33-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
33+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3434
resources:
3535
- name: Remainder for integers
3636
type: Test/Echo
@@ -60,7 +60,7 @@ two other mathematical operations.
6060

6161
```yaml
6262
# mod.example.2.dsc.config.yaml
63-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
63+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6464
resources:
6565
- name: Remainder for nested functions
6666
type: Test/Echo

0 commit comments

Comments
 (0)