Skip to content

schema: Allow verbose no-argument actions in the settings schema#20430

Open
Weichenleeeee123 wants to merge 1 commit into
microsoft:mainfrom
Weichenleeeee123:fix/11332-schema-verbose-no-args
Open

schema: Allow verbose no-argument actions in the settings schema#20430
Weichenleeeee123 wants to merge 1 commit into
microsoft:mainfrom
Weichenleeeee123:fix/11332-schema-verbose-no-args

Conversation

@Weichenleeeee123

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

  • Adds a strict schema definition for verbose forms of actions that take no arguments.
  • Wires four existing optional-argument action schemas into FullCommand.command.
  • Preserves required-argument validation and rejects unexpected arguments for no-argument actions.

References and Relevant Issues

Closes #11332

Detailed Description of the Pull Request / Additional comments

Windows Terminal accepts both of these forms:

{ "command": "toggleAlwaysOnTop" }
{ "command": { "action": "toggleAlwaysOnTop" } }

The settings schema only accepted the short form because FullCommand.command
had no object branch for actions without arguments.

This adds a strict NoArgsAction definition for the 39 argument-free actions.
It also connects the existing AddMarkAction, SetFocusModeAction,
SetFullScreenAction, and SetMaximizedAction definitions, which were not
referenced by FullCommand.command.

Validation Steps Performed

Validated doc/cascadia/profiles.schema.json with PowerShell 7.6 Test-Json:

  • All 39 no-argument actions validate in verbose form.
  • Existing short forms still validate.
  • Empty and populated forms of the four optional-argument actions validate.
  • Actions missing required arguments remain invalid.
  • Unknown actions, incorrect argument types, and unexpected arguments remain invalid.
  • The schema parses successfully and git diff --check passes.

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service Bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-Schema Things that have to do with the json schema. Product-Terminal The new Windows Terminal. labels Jul 16, 2026
@Weichenleeeee123
Weichenleeeee123 marked this pull request as ready for review July 16, 2026 14:54
Copilot AI review requested due to automatic review settings July 16, 2026 14:54

This comment was marked as spam.

@DHowett DHowett changed the title Allow verbose no-argument actions in the settings schema schema: Allow verbose no-argument actions in the settings schema Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Schema Things that have to do with the json schema. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema does not allow actions without arguments in verbose form

2 participants