GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ensure all errors are returned for Test-Json with List output format by anamnavi · Pull Request #28273 · PowerShell/PowerShell

Conversation

@anamnavi

@anamnavi Anam Navied (anamnavi) commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

PR Summary

This pull request makes a small but important change to the default output format used in the TestJsonCommand class. The output format for JSON evaluation has been switched from hierarchical to list format to better suit the intended use case for 7.6.

  • Changed the default OutputFormat in the BeginProcessing method of TestJsonCommand from Hierarchical to List (src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs) as OutputFormat.Hierarchical is supported for 7.7+ only.

PR Context

Resolves #28218 #28245

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge. If this PR is a work in progress, please open this as a Draft Pull Request and mark it as Ready to Review when it is ready to merge.
  • Breaking changes
    • None
    • OR
    • Experimental feature(s) needed
      • Experimental feature name(s):
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed
      • Issue filed:
  • Testing - New and feature
    • N/A or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anamnavi
Ensure all errors are returned for Test-Json with List output format
8979460
Copilot AI balanced review requested due to automatic review settings October 28, 2026 16:18
@azure-pipelines

azure-pipelines Bot commented Oct 28, 2026

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anamnavi Anam Navied (anamnavi) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 28, 2026
Copilot started reviewing on behalf of Anam Navied (anamnavi) October 28, 2026 16:18
View session
@anamnavi Anam Navied (anamnavi) added the Backport-7.6.x-Consider label Oct 28, 2026
Copilot AI reviewed Oct 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟢 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.OutputFormat from Hierarchical to List in BeginProcessing.
File Description
src/​Microsoft.PowerShell.Commands.Utility/​commands/​utility/​TestJsonCommand.cs Switches JSON schema evaluation to list output.

Review effort: Balanced

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Oct 28, 2026
View reviewed changes
@daxian-dbw Dongbo Wang (daxian-dbw) added the Backport-7.7.x-Consider label Oct 28, 2026
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Anam Navied (@anamnavi) Please add fix #<issue-number> in the PR description, so the issue can be resolved properly when you merge the PR.

anamnavi reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit af43aa9 into PowerShell:release/v7.6.10 Oct 28, 2026
38 of 43 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 28, 2026
Test-Json in 7.6.7 writes no error for violations nested below the first level (e.g. array items) #28218
Closed
Test-Json fails with UnresolvedJsonSchemaRef when "$schema" is http://json-schema.org/schema (regression in 7.6.7, 7.5.12, 7.4.21) #28245
Closed
@daxian-dbw Dongbo Wang (daxian-dbw) removed Backport-7.6.x-Consider Backport-7.7.x-Consider labels Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@anamnavi @daxian-dbw @adityapatwardhan
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.