Deny invalid members in workspace schema (#6450)

## Summary

This has bitten me a few times.
This commit is contained in:
Charlie Marsh 2024-08-22 16:48:00 -04:00 committed by GitHub
parent 4591d0b4b2
commit 9ee52e4e39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -150,6 +150,7 @@ pub struct ToolUv {
#[derive(Serialize, Deserialize, OptionsMetadata, Default, Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub struct ToolUvWorkspace {
/// Packages to include as workspace members.
///
@ -206,7 +207,7 @@ impl Deref for SerdePattern {
/// A `tool.uv.sources` value.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[serde(untagged, deny_unknown_fields)]
#[serde(rename_all = "kebab-case", untagged, deny_unknown_fields)]
pub enum Source {
/// A remote Git repository, available over HTTPS or SSH.
///

3
uv.schema.json generated
View file

@ -1423,7 +1423,8 @@
"$ref": "#/definitions/String"
}
}
}
},
"additionalProperties": false
}
}
}