From 4591d0b4b27cc854c1270f1179af8468f4b8ceb1 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 22 Aug 2024 16:39:27 -0400 Subject: [PATCH] Remove URI type from JSON Schema (#6449) ## Summary Relative paths (like `./foo/bar`) are also welcome here! --- crates/distribution-types/src/index_url.rs | 2 -- uv.schema.json | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/distribution-types/src/index_url.rs b/crates/distribution-types/src/index_url.rs index c0a23bf1f..6ffc6a1a2 100644 --- a/crates/distribution-types/src/index_url.rs +++ b/crates/distribution-types/src/index_url.rs @@ -34,7 +34,6 @@ impl schemars::JsonSchema for IndexUrl { fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { schemars::schema::SchemaObject { instance_type: Some(schemars::schema::InstanceType::String.into()), - format: Some("uri".to_owned()), metadata: Some(Box::new(schemars::schema::Metadata { description: Some("The URL of an index to use for fetching packages (e.g., `https://pypi.org/simple`).".to_string()), ..schemars::schema::Metadata::default() @@ -193,7 +192,6 @@ impl schemars::JsonSchema for FlatIndexLocation { fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { schemars::schema::SchemaObject { instance_type: Some(schemars::schema::InstanceType::String.into()), - format: Some("uri".to_owned()), metadata: Some(Box::new(schemars::schema::Metadata { description: Some("The path to a directory of distributions, or a URL to an HTML file with a flat listing of distributions.".to_string()), ..schemars::schema::Metadata::default() diff --git a/uv.schema.json b/uv.schema.json index 491494d67..96adf2a3c 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -451,8 +451,7 @@ }, "FlatIndexLocation": { "description": "The path to a directory of distributions, or a URL to an HTML file with a flat listing of distributions.", - "type": "string", - "format": "uri" + "type": "string" }, "IndexStrategy": { "oneOf": [ @@ -481,8 +480,7 @@ }, "IndexUrl": { "description": "The URL of an index to use for fetching packages (e.g., `https://pypi.org/simple`).", - "type": "string", - "format": "uri" + "type": "string" }, "KeyringProviderType": { "description": "Keyring provider type to use for credential lookup.",