Skip to content

Comments

Replace apiVersion with requireVersion#1399

Open
SteveL-MSFT wants to merge 2 commits intoPowerShell:mainfrom
SteveL-MSFT:requireVersion
Open

Replace apiVersion with requireVersion#1399
SteveL-MSFT wants to merge 2 commits intoPowerShell:mainfrom
SteveL-MSFT:requireVersion

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

Rename apiVersion to requireVersion but keep apiVersion as an alias

PR Context

Fix #1376

@SteveL-MSFT SteveL-MSFT added Doc-Impact Schema-Impact Change requires updating a canonical schema for configs or manifests labels Feb 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the configuration document resource version requirement field from apiVersion to the clearer requireVersion, while preserving backward compatibility by accepting apiVersion as an alias during deserialization.

Changes:

  • Update configurator resource discovery to use require_version instead of api_version.
  • Update config document model to serialize as requireVersion and accept apiVersion as an alias.
  • Update PowerShell versioning tests to use requireVersion and add coverage for the apiVersion alias.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
lib/dsc-lib/src/configure/mod.rs Switches discovery/filtering to read the version requirement from require_version.
lib/dsc-lib/src/configure/config_doc.rs Renames the serialized field to requireVersion and adds apiVersion as a serde alias; updates related unit assertions.
dsc/tests/dsc_config_version.tests.ps1 Updates YAML to requireVersion and adds a test ensuring apiVersion still works as an alias.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Doc-Impact Schema-Impact Change requires updating a canonical schema for configs or manifests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: More semantically correct alias for apiVersion in configuration document

1 participant