mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-29 19:17:26 +00:00
Deny invalid members in workspace schema (#6450)
## Summary This has bitten me a few times.
This commit is contained in:
parent
4591d0b4b2
commit
9ee52e4e39
2 changed files with 4 additions and 2 deletions
|
|
@ -150,6 +150,7 @@ pub struct ToolUv {
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, OptionsMetadata, Default, Debug, Clone, PartialEq, Eq)]
|
#[derive(Serialize, Deserialize, OptionsMetadata, Default, Debug, Clone, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
|
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||||
pub struct ToolUvWorkspace {
|
pub struct ToolUvWorkspace {
|
||||||
/// Packages to include as workspace members.
|
/// Packages to include as workspace members.
|
||||||
///
|
///
|
||||||
|
|
@ -206,7 +207,7 @@ impl Deref for SerdePattern {
|
||||||
/// A `tool.uv.sources` value.
|
/// A `tool.uv.sources` value.
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
#[serde(untagged, deny_unknown_fields)]
|
#[serde(rename_all = "kebab-case", untagged, deny_unknown_fields)]
|
||||||
pub enum Source {
|
pub enum Source {
|
||||||
/// A remote Git repository, available over HTTPS or SSH.
|
/// A remote Git repository, available over HTTPS or SSH.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
3
uv.schema.json
generated
3
uv.schema.json
generated
|
|
@ -1423,7 +1423,8 @@
|
||||||
"$ref": "#/definitions/String"
|
"$ref": "#/definitions/String"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue