Skip to content

Commit

Permalink
Deny invalid members in workspace schema
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Aug 22, 2024
1 parent 2dd9df1 commit ce21890
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/uv-workspace/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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.
///
Expand Down
3 changes: 2 additions & 1 deletion uv.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce21890

Please sign in to comment.