Skip to content

Commit 2b99caa

Browse files
authored
Merge pull request #648 from michaeltlombardi/gh-642/main/schema-casing-canonicalization
(GH-642) Ensure camelCase for items in `dsc_lib`
2 parents 41bd1c8 + ffb0424 commit 2b99caa

File tree

398 files changed

+40161
-549
lines changed

Some content is hidden

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

398 files changed

+40161
-549
lines changed

.github/ISSUE_TEMPLATE/Bug_Report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ body:
3535
3636
```yaml
3737
# repro.dsc.config.yaml
38-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
38+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3939
resources:
4040
- name: repro
4141
type: Test/Echo

.vscode/docs.code-snippets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"",
4343
"```yaml",
4444
"# ${1:name}.example.1.dsc.config.yaml",
45-
"\\$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json",
45+
"\\$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json",
4646
"resources:",
4747
"- name: ${7:descriptive resource name}",
4848
" type: Test/Echo",
@@ -101,7 +101,7 @@
101101
"",
102102
"```yaml",
103103
"# $TM_FILENAME_BASE.example.$1.dsc.config.yaml",
104-
"\\$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json",
104+
"\\$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json",
105105
"resources:",
106106
"- name: ${4:descriptive resource name}",
107107
" type: Test/Echo",

archive/registry/registry.dsc.resource.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json",
2+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
33
"type": "Microsoft.Windows/Registry",
44
"description": "Manage Windows Registry keys and values",
55
"tags": [

configurations/windows/windows_baseline.dsc.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# This configuration validates a Windows system against a security baseline configuration
2-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
2+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
33
metadata:
44
Microsoft.DSC:
5-
securityContext: Elevated
5+
securityContext: elevated
66
resources:
77
- name: Validate the OS is Windows
88
type: Microsoft.DSC/Assertion
99
properties:
10-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
10+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
1111
resources:
1212
- name: os
1313
type: Microsoft/OSInfo
@@ -18,7 +18,7 @@ resources:
1818
dependsOn:
1919
- "[resourceId('Microsoft.DSC/Assertion','Validate the OS is Windows')]"
2020
properties:
21-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
21+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
2222
resources:
2323
- name: Default RDP port
2424
type: Microsoft.Windows/Registry

configurations/windows/windows_inventory.dsc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
1+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
22
resources:
33
- name: Validate the OS is Windows
44
type: Microsoft.DSC/Assertion
55
properties:
6-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
6+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
77
resources:
88
- name: os
99
type: Microsoft/OSInfo

docs/reference/cli/config/get.md

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 12 additions & 12 deletions
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

Lines changed: 17 additions & 1 deletion
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

0 commit comments

Comments
 (0)