fix(schema): allow array values in tool additionalProperties#9400
fix(schema): allow array values in tool additionalProperties#9400
Conversation
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 SummaryThis PR extends the JSON schema for tool Confidence Score: 5/5Safe 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 No files require special attention Important Files Changed
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)"]
Reviews (1): Last reviewed commit: "fix(schema): allow array values in tool ..." | Re-trigger Greptile |
There was a problem hiding this comment.
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.
| { | ||
| "type": "array" | ||
| }, |
There was a problem hiding this comment.
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
- When defining JSON schema, avoid redundancy by defining reusable schema components in $defs and referencing them using $ref.
### 🚀 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)
Tool options like rust
componentsaccept arrays, e.g.:The old schema though would say otherwise, and linters like tombi flag the above as invalid.