Skip to content

docs: Update configuration document schema reference - #1707

Open
Gijs Reijn (Gijsreyn) wants to merge 1 commit into
PowerShell:mainfrom
Gijsreyn:docs-schemas-config-documents
Open

docs: Update configuration document schema reference#1707
Gijs Reijn (Gijsreyn) wants to merge 1 commit into
PowerShell:mainfrom
Gijsreyn:docs-schemas-config-documents

Conversation

@Gijsreyn

Copy link
Copy Markdown
Collaborator

PR Summary

As requested, shortened the number of files and updated them based on separate schema groups.

PR context

Synced docs from Microsoft Learn: MicrosoftDocs/PowerShell-Docs-DSC#414

Copilot AI lite review requested due to automatic review settings September 4, 2026 02:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several documentation updates conflict with the referenced v3.1.0 JSON schemas (including documenting unsupported properties and listing schema versions/URLs that do not exist in-repo), which would mislead users.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the DSC configuration schema reference documentation (synced from Microsoft Learn) under docs/reference/schemas/config/, expanding and reorganizing schema reference content and refreshing metadata dates.

Changes:

  • Updated the resource instance schema reference with new/expanded properties and revised constraints.
  • Updated the configuration document schema reference with additional $schema URL variants and new documented top-level properties.
  • Updated parameter schema type value casing (for secureString / secureObject) and aligned related wording.
File summaries
File Description
docs/reference/schemas/config/resource.md Updates the resource instance schema reference content, including required properties and constraints.
docs/reference/schemas/config/parameter.md Updates parameter type ValidValues casing and related explanatory text.
docs/reference/schemas/config/metadata.md Updates metadata guidance and securityContext value casing to align with current schema expectations.
docs/reference/schemas/config/document.md Expands $schema ValidValues list and documents additional configuration document properties/directives.
Review details

Suppressed comments (4)

docs/reference/schemas/config/resource.md:45

  • condition is documented as part of the resource instance schema, but the referenced schema file (schemas/v3.1.0/config/document.resource.json) does not define a condition property; documenting it here will mislead users and validators unless the schema is updated or this page is explicitly scoped to a newer schema version.
### condition

The `condition` property defines an expression that DSC evaluates before invoking the instance. If
the expression evaluates to `true`, DSC invokes the instance as normal. If it evaluates to any other
value, DSC skips the instance and doesn't include it in the results for the operation.

docs/reference/schemas/config/resource.md:76

  • The type regex pattern here is broader than the referenced schema constraint. schemas/v3.1.0/definitions/resourceType.json limits dot-separated segments to {0,3}; using * suggests unlimited segments and doesn't match validation behavior.
Pattern:  ^\w+(\.\w+)*\/\w+$

docs/reference/schemas/config/resource.md:123

  • Inside the name schema block, the property is marked optional with a default empty string, but the referenced schema (schemas/v3.1.0/config/document.resource.json + definitions/instanceName.json) requires name and enforces minLength/pattern constraints. This block should reflect the schema’s required/constraint settings.
Type:     string
Required: false
Default:  ""

docs/reference/schemas/config/resource.md:245

  • The dependsOn schema block currently implies any string is allowed, but the referenced JSON schema constrains items to resourceId()-expression strings and intends uniqueness. Please restore the item constraints to match schema validation.
Type:      array
Required:  false
ItemsType: string
  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +197 to +201
### contentVersion

The `contentVersion` property defines a version string for the configuration document. You can use
this property to track revisions of the document. DSC doesn't validate or use this value when
processing a configuration document. The document that the `dsc config export` command returns
Comment on lines 35 to 37
Every resource instance must be an object that defines these properties:

- [name](#name)
- [type](#type)
Comment on lines 79 to 83
```yaml
Type: string
Required: true
ValidValues: [string, securestring, int, bool, object, secureobject, array]
ValidValues: [string, secureString, int, bool, object, secureObject, array]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants