Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

Value is a variant and can be any valid JSON type, so using it for an object wasn't correct. Change to using Map<String,Value> which is what a Value object is stored as.

PR Context

Fix #1202

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 fixes type correctness in the Echo resource by changing object representations from the generic Value type to the more precise Map<String,Value> type. The change ensures that object types are properly represented rather than using a variant that could be any JSON type.

Key Changes:

  • Updated Output::Object and SecureObject types from Value to Map<String,Value>
  • Modified the redaction logic to handle the new map-based object type

Reviewed Changes

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

File Description
resources/dscecho/src/echo.rs Changed type definitions for Output::Object and SecureObject.secure_object from Value to Map<String,Value>
resources/dscecho/src/main.rs Updated redaction call to convert between map and Value types when processing objects

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Oct 24, 2025
Merged via the queue into PowerShell:main with commit b4f0fb2 Oct 24, 2025
19 checks passed
@SteveL-MSFT SteveL-MSFT deleted the echo-schema branch October 24, 2025 19:28
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.

The Echo resource has an incorrect JSON Schema and type definition

2 participants