Default `#[schemars(deny_unknown_fields)] for json-language-server schemas (#33883)

Followup to #33678, doing the same thing for all JSON Schema files
provided to json-language-server

Release Notes:

* Added warnings for unknown fields when editing `tasks.json` /
`snippets.json`.
This commit is contained in:
Michael Sloan 2025-07-03 18:57:43 -06:00 committed by GitHub
parent 38544e514a
commit ed7552d3e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 136 additions and 149 deletions

View file

@ -272,6 +272,7 @@ impl JsonLspAdapter {
#[cfg(debug_assertions)]
fn generate_inspector_style_schema() -> serde_json_lenient::Value {
let schema = schemars::generate::SchemaSettings::draft2019_09()
.with_transform(util::schemars::DefaultDenyUnknownFields)
.into_generator()
.root_schema_for::<gpui::StyleRefinement>();