Repository navigation
Ensure all errors are returned for Test-Json with List output format - #28273
Merged
Dongbo Wang (daxian-dbw) merged 1 commit intoOct 28, 2026
Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
Dongbo Wang (daxian-dbw) merged 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the switch to list-format JSON schema evaluation.
No open issues 🎉
What changed in this PR
Updates Test-Json to use list-format schema evaluation for PowerShell 7.6, aiming to return all validation errors without relying on hierarchical output support intended for 7.7+.
Changes:
- Changes
EvaluationOptions.OutputFormatfromHierarchicaltoListinBeginProcessing.
| File | Description |
|---|---|
| src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs | Switches JSON schema evaluation to list output. |
Review effort: Balanced
Aditya Patwardhan (adityapatwardhan)
approved these changes
Oct 28, 2026
Member
|
Anam Navied (@anamnavi) Please add |
Dongbo Wang (daxian-dbw)
merged commit Oct 28, 2026
af43aa9
into
PowerShell:release/v7.6.10
38 of 43 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
This pull request makes a small but important change to the default output format used in the
TestJsonCommandclass. The output format for JSON evaluation has been switched from hierarchical to list format to better suit the intended use case for 7.6.OutputFormatin theBeginProcessingmethod ofTestJsonCommandfromHierarchicaltoList(src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs) asOutputFormat.Hierarchicalis supported for 7.7+ only.PR Context
Resolves #28218 #28245
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header