Skip to content

fix(schema): allow array values in tool additionalProperties#9400

Merged
jdx merged 1 commit intojdx:mainfrom
JP-Ellis:fix/tool-schema
Apr 26, 2026
Merged

fix(schema): allow array values in tool additionalProperties#9400
jdx merged 1 commit intojdx:mainfrom
JP-Ellis:fix/tool-schema

Conversation

@JP-Ellis
Copy link
Copy Markdown
Contributor

Tool options like rust components accept arrays, e.g.:

[tools]
rust = { version = "1.77", components = ["rustfmt", "clippy"] }

The old schema though would say otherwise, and linters like tombi flag the above as invalid.

Tool options like rust `components` accept arrays, e.g.:

```toml
[tools]
rust = { version = "1.77", components = ["rustfmt", "clippy"] }
```

Signed-off-by: JP-Ellis <josh@jpellis.me>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 26, 2026

Greptile Summary

This PR extends the JSON schema for tool additionalProperties to accept array-typed values alongside the existing string, number, boolean, and object types. The fix unblocks tools like rust that accept array-valued options (e.g. components = ["rustfmt", "clippy"]) which were previously rejected by schema validators such as tombi.

Confidence Score: 5/5

Safe to merge — single-line additive schema change with no logic impact

The change is a pure schema extension: it adds one missing type to an existing oneOf list, bringing it in line with how tools like rust already use array-valued options. No existing behavior is altered, no code logic is touched, and the fix directly matches the bug report.

No files require special attention

Important Files Changed

Filename Overview
schema/mise.json Adds {"type": "array"} to the oneOf list in additionalProperties for tool option objects, allowing array-valued options like components = ["rustfmt", "clippy"]

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Tool additionalProperties value"] --> B{oneOf}
    B --> C["string"]
    B --> D["number"]
    B --> E["boolean"]
    B --> F["array ✨ NEW"]
    B --> G["object (additionalProperties: true)"]
Loading

Reviews (1): Last reviewed commit: "fix(schema): allow array values in tool ..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the schema/mise.json file to allow array values for tool-specific options. The review feedback suggests refactoring the schema to use a reusable component for these options via $ref to ensure consistency and prevent validation failures in other sections like tasks, which currently remain more restrictive.

Comment thread schema/mise.json
Comment on lines +2296 to +2298
{
"type": "array"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This change correctly allows array values for tool-specific options in the top-level tools section. To ensure consistency and avoid redundancy, consider defining a reusable schema component for tool options in $defs and referencing it using $ref in the top-level tools section, as well as within $defs.task_props (around line 2610) and $defs.task (around line 1946). These sections currently have more restrictive additionalProperties (allowing only string), which will cause validation failures for array-based options like Rust components inside task definitions.

References
  1. When defining JSON schema, avoid redundancy by defining reusable schema components in $defs and referencing them using $ref.

@jdx jdx merged commit aff9814 into jdx:main Apr 26, 2026
35 checks passed
jdx pushed a commit that referenced this pull request Apr 26, 2026
### 🚀 Features

- **(backend)** add global libc preference by @jdx in
[#9404](#9404)
- opt-in to pre-release versions for github and aqua backends by
@jakedgy in [#9329](#9329)

### 🐛 Bug Fixes

- **(backend)** allow unresolved latest opt-in by @jdx in
[#9401](#9401)
- **(install)** stop rewriting healthy runtime symlinks by @jdx in
[#9410](#9410)
- **(node)** route musl tarball URLs to unofficial-builds by @jdx in
[#9409](#9409)
- **(prune)** skip remote version resolution for tracked configs by @jdx
in [#9406](#9406)
- **(schema)** allow array values in tool additionalProperties by
@JP-Ellis in [#9400](#9400)

### 📦️ Dependency Updates

- bump communique to 1.1.2 by @jdx in
[#9402](#9402)

### 📦 Registry

- use aqua for rumdl by @scop in
[#9397](#9397)

### Chore

- **(ci)** improve pr-closer workflow by @jdx in
[#9403](#9403)
- **(release)** stop appending sponsor blurb when communique succeeds by
@jdx in [#9395](#9395)

### New Contributors

- @JP-Ellis made their first contribution in
[#9400](#9400)
@JP-Ellis JP-Ellis deleted the fix/tool-schema branch April 26, 2026 22:47
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.

2 participants