Remove URI type from JSON Schema (#6449)

## Summary

Relative paths (like `./foo/bar`) are also welcome here!
This commit is contained in:
Charlie Marsh 2024-08-22 16:39:27 -04:00 committed by GitHub
parent fa3446651f
commit 4591d0b4b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View file

@ -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()