diff --git a/crates/uv-configuration/src/config_settings.rs b/crates/uv-configuration/src/config_settings.rs index 7d8907483..ed728d14c 100644 --- a/crates/uv-configuration/src/config_settings.rs +++ b/crates/uv-configuration/src/config_settings.rs @@ -29,7 +29,7 @@ impl FromStr for ConfigSettingEntry { } #[derive(Debug, Clone, PartialEq, Eq)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema), schemars(untagged))] enum ConfigSettingValue { /// The value consists of a single string. String(String), diff --git a/uv.schema.json b/uv.schema.json index 13df79b37..9585b9779 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -645,35 +645,17 @@ ] }, "ConfigSettingValue": { - "oneOf": [ + "anyOf": [ { "description": "The value consists of a single string.", - "type": "object", - "required": [ - "String" - ], - "properties": { - "String": { - "type": "string" - } - }, - "additionalProperties": false + "type": "string" }, { "description": "The value consists of a list of strings.", - "type": "object", - "required": [ - "List" - ], - "properties": { - "List": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false + "type": "array", + "items": { + "type": "string" + } } ] },