Closed michaeltlombardi closed 10 months ago
Working through this PR, I think it would be worth considering a shortened links, like:
# Unbundled configuration document schema
-https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
+https://aka.ms/dsc/schemas/2023/10/config/document.json
# Bundled configuration document schema
-https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/config/document.json
+https://aka.ms/dsc/schemas/2023/10/config/document.bundled.json
# Enhanced authoring configuration document schema
-https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/config/document.vscode.json
+https://aka.ms/dsc/schemas/2023/10/config/document.vscode.json
# Unbundled configuration document schema
-https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.json
+https://aka.ms/dsc/schemas/2023/10/resource/manifest.json
# Bundled configuration document schema
-https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/resource/manifest.json
+https://aka.ms/dsc/schemas/2023/10/resource/manifest.bundled.json
# Enhanced authoring configuration document schema
-https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/resource/manifest.vscode.json
+https://aka.ms/dsc/schemas/2023/10/resource/manifest.vscode.json
PR Summary
This change converts the string constants for the canonical schema URIs for both the configuration document and resource manifest schemas to enums, defining the valid URIs as variants.
For each supported version of a schema, there are three variants:
Version<YYYY>_<MM>
- The canonical URI to the non-bundled schema. Using this schema requires retrieving every referenced schema, but it is also the least-munged.Bundled<YYYY>_<MM>
- The canonical URI to the bundled schema. When using this schema, only the bundled schema needs to be retrieved.VSCode<YYYY>_<MM>
- The canonical URI to the enhanced authoring schema. This schema is specifically implemented to support contextual help and DevX when authoring in VS Code. It is much larger than the other schemas.Which gives six variants:
Version2023_08
,Bundled2023_08
, andVSCode2023_08
for 2023/08Version2023_10
,Bundled2023_10
, andVSCode2023_10
for 2023/10Currently, the specified schema is not actually used by DSC to validate the document or manifest. In the future, we could use the version to identify how to validate and process the data.
PR Context
With the breaking changes made in recent PRs, and keeping in mind that we will eventually need to handle different versions of the schema, this PR: