Skip to content

Commit 087075a

Browse files
michaeltlombardiSteveL-MSFT
authored andcommitted
(PowerShellGH-642) Update schema URIs to aka.ms and v3
This change updates the schema URIs in the various resource manifests, configuration documents, and tests to use the new schema URIs: - `https://aka.ms/dsc/schemas/v3/bundled/config/document.json` for configuration documents. - `https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json` for resource manifests. This change pins the changes to the major version to reduce how often these files need to be updated with future releases. It uses the `aka.ms` prefix instead of the GitHub URI prefix for readability and because we expect the majority of users to prefer the shorter URI. With this change in place, tests broken in the previous commit should pass again.
1 parent 2373e28 commit 087075a

File tree

79 files changed

+149
-148
lines changed

Some content is hidden

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

79 files changed

+149
-148
lines changed

.github/ISSUE_TEMPLATE/Bug_Report.yml

+1-1
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

+2-2
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

+1-1
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

+3-3
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:
55
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

+2-2
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

dsc/assertion.dsc.resource.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.json",
2+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
33
"type": "Microsoft.DSC/Assertion",
44
"version": "0.1.0",
55
"description": "`test` will be invoked for all resources in the supplied configuration.",

dsc/examples/assertion.dsc.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example configuration that uses assertions to validate the environment before running the 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
resources:
44
- name: current user registry
55
type: Microsoft.Windows/Registry
@@ -11,7 +11,7 @@ resources:
1111
- name: my assertions
1212
type: Microsoft.DSC/Assertion
1313
properties:
14-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
14+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
1515
resources:
1616
- name: os
1717
type: Microsoft/OSInfo

dsc/examples/brew.dsc.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Example to see if PowerShell 7 is installed, install it, or get all installed packages
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
resources:
44
- name: assertions
55
type: Microsoft.DSC/Assertion
66
properties:
7-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
7+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
88
resources:
99
- name: os_check
1010
type: Microsoft/OSInfo

dsc/examples/brew_export.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example to see if PowerShell 7 is installed, install it, or get all installed packages
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
resources:
44
- name: brew
55
type: DSC.PackageManagement/Brew

dsc/examples/brew_uninstall.dsc.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Example to see if PowerShell 7 is installed, install it, or get all installed packages
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
resources:
44
- name: assertions
55
type: Microsoft.DSC/Assertion
66
properties:
7-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
7+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
88
resources:
99
- name: os_check
1010
type: Microsoft/OSInfo

dsc/examples/groups.dsc.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Example for grouping and groups in groups
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:
55
requiredSecurityContext: current # this is the default and just used as an example indicating this config works for admins and non-admins
66
resources:
77
- name: Last Group
88
type: Microsoft.DSC/Group
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: Last
1313
type: Microsoft.DSC.Debug/Echo
@@ -18,7 +18,7 @@ resources:
1818
- name: First Group
1919
type: Microsoft.DSC/Group
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: First
2424
type: Microsoft.DSC.Debug/Echo
@@ -27,7 +27,7 @@ resources:
2727
- name: Nested Group
2828
type: Microsoft.DSC/Group
2929
properties:
30-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
30+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
3131
resources:
3232
- name: Nested Second
3333
type: Microsoft.DSC.Debug/Echo

dsc/examples/include.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a simple example of how to Include another configuration into this one
22

3-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
3+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
44
resources:
55
- name: get os info
66
type: Microsoft.DSC/Include

dsc/examples/invalid_schema.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Sample configuration with invalid properties that don't match the resource schema.
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
resources:
44
- name: os
55
type: Microsoft/OSInfo

dsc/examples/multiline.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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: test multi-line
44
type: Microsoft.DSC.Debug/Echo

dsc/examples/osinfo.dsc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
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
"resources": [
44
{
55
"name": "os",

dsc/examples/osinfo_parameters.dsc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
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
"parameters": {
44
"osFamily": {
55
"type": "string",

dsc/examples/osinfo_parameters.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
parameters:
33
osFamily:
44
type: string

dsc/examples/osinfo_registry.dsc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
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
"description": "Simple example using two different resources and one of them twice."
55
},

dsc/examples/osinfo_registry.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Simple example using two different resources and one of them twice.
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
resources:
44
- name: os
55
type: Microsoft/OSInfo

dsc/examples/parallel.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example on how concurrency would be defined in the 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
_timeoutSeconds: 600 # example of setting timeout for orchestration, should be namespaced?
55
resources:

dsc/examples/powershell.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example configuration mixing native app resources with classic PS resources
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
resources:
44
- name: Use class PowerShell resources
55
type: Microsoft.DSC/PowerShell

dsc/examples/reference.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Simple example showing how to reference output from a resource to use in another
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
resources:
44
- name: os
55
type: Microsoft/OSInfo

dsc/examples/require_admin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# example showing use of specific metadata to indicate this config requires admin to run
22
# note that the resource doesn't require admin, but this will fail to even try to run the
33
# config if the user is not root or elevated as administrator
4-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
4+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
55
metadata:
66
Microsoft.DSC:
77
securityContext: elevated

dsc/examples/require_nonadmin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# example showing use of specific metadata to indicate this config requires admin to run
22
# this will fail to even try to run the config if the user is root or elevated as administrator
3-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
3+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
44
metadata:
55
Microsoft.DSC:
66
securityContext: restricted

dsc/examples/secure_parameters.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
parameters:
33
myString:
44
type: secureString

dsc/examples/variables.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
parameters:
33
myParameter:
44
type: string

dsc/examples/winget.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The `Microsoft.Winget.DSC` resources needs to be installed: install-psresource Microsoft.Winget.DSC -Prerelease
22

3-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
3+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
44
parameters:
55
ensureCalc:
66
type: string

dsc/examples/winps_script.dsc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
metadata:
33
Microsoft.DSC:
44
securityContext: elevated

dsc/group.dsc.resource.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.json",
2+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
33
"type": "Microsoft.DSC/Group",
44
"version": "0.1.0",
55
"description": "All resources in the supplied configuration is treated as a group.",

dsc/include.dsc.resource.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.json",
2+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
33
"type": "Microsoft.DSC/Include",
44
"version": "0.1.0",
55
"description": "Allows including a configuration file with optional parameter file.",

dsc/tests/dsc_args.tests.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Describe 'config argument tests' {
55
BeforeAll {
66
$manifest = @'
77
{
8-
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.json",
8+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
99
"type": "Test/Hello",
1010
"version": "0.1.0",
1111
"get": {
@@ -117,7 +117,7 @@ actualState:
117117
param($parameter)
118118

119119
$yaml = @'
120-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
120+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
121121
resources:
122122
- name: os
123123
type: Microsoft/OSInfo
@@ -137,7 +137,7 @@ resources:
137137
param($parameter)
138138

139139
$yaml = @'
140-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
140+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
141141
resources:
142142
- name: os
143143
type: Microsoft/OSInfo

dsc/tests/dsc_config_get.tests.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Describe 'dsc config get tests' {
3333

3434
It 'can accept the use of --output-format as a subcommand' {
3535
$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
3939
type: Microsoft.DSC.Debug/Echo
@@ -58,7 +58,7 @@ Describe 'dsc config get tests' {
5858

5959
It 'json progress for config subcommand' {
6060
$config_yaml = @"
61-
`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
61+
`$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
6262
resources:
6363
- name: Echo 1
6464
type: Microsoft.DSC.Debug/Echo
@@ -150,7 +150,7 @@ Describe 'dsc config get tests' {
150150

151151
It 'contentVersion is ignored' {
152152
$config_yaml = @"
153-
`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
153+
`$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
154154
contentVersion: 1.0.0.0
155155
resources:
156156
- name: Echo

dsc/tests/dsc_config_set.tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Describe 'dsc config set tests' {
55
It 'can use _exist with resources that support and do not support it' {
66
$config_yaml = @"
7-
`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
7+
`$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
88
resources:
99
- name: Exist
1010
type: Test/Exist

dsc/tests/dsc_config_test.tests.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
Describe 'dsc config test tests' {
55
It 'Assertion works correctly' {
66
$configYaml = @'
7-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
7+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
88
resources:
99
- name: Operating System Assertion
1010
type: Microsoft.DSC/Assertion
1111
properties:
12-
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
12+
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
1313
resources:
1414
- name: Is64BitOS
1515
type: Microsoft/OSInfo

0 commit comments

Comments
 (0)