Skip to content

Comments

Enable getting adapted resource schema#1401

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

Enable getting adapted resource schema#1401
SteveL-MSFT wants to merge 2 commits intoPowerShell:mainfrom
SteveL-MSFT:adapted-schema

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Feb 20, 2026

PR Summary

Enable retrieving schema from an adapted resource.

For an adapted resource manifest based resource, it's retrieved from the manifest which must be embedded.
For a non-manifest adapted resource, the adapter is called with the schema command and passed the resourceType and the adapter needs to return a JSONLine that represents the schema.

Made process_set_delete_args() private since it's only used within the same file

PR Context

Fix #1352
Fix #872

@SteveL-MSFT SteveL-MSFT requested a review from Copilot February 20, 2026 00:57
@SteveL-MSFT SteveL-MSFT added Doc-Impact Schema-Impact Change requires updating a canonical schema for configs or manifests labels Feb 20, 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

This PR enables retrieving schemas from adapted resources. For manifest-based adapted resources, the schema is retrieved from the embedded manifest. For non-manifest adapted resources, the adapter is invoked with the schema command, passing the resource type, and returns the schema as JSON.

Changes:

  • Added Schema operation to adapter operations
  • Modified schema retrieval to support adapted resources via adapter invocation
  • Updated test cases to verify adapted resource schema retrieval

Reviewed changes

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

Show a summary per file
File Description
tools/dsctest/src/args.rs Added Schema variant to AdapterOperation enum
tools/dsctest/src/adapter.rs Implemented schema retrieval logic for adapted test resources
tools/dsctest/dsctest.dsc.manifests.json Updated manifest schemas and added schema command configuration
lib/dsc-lib/src/dscresources/resource_manifest.rs Introduced SchemaArgKind enum and updated SchemaCommand to use it
lib/dsc-lib/src/dscresources/dscresource.rs Added adapter-based schema invocation and updated schema retrieval logic
lib/dsc-lib/src/dscresources/command_resource.rs Added process_schema_args function and updated all functions to pass target_resource
dsc/tests/dsc_resource_schema.tests.ps1 Added test cases for adapted resource schema retrieval
dsc/tests/dsc_adapter.tests.ps1 Updated test expectation to reflect schema structure change

💡 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.

Enable adapter to return schema for a resource Need a way to get schema from adapted resources for intellisense

1 participant