schemars/json_schema_impls/
url2.rs

1use crate::SchemaGenerator;
2use crate::{json_schema, JsonSchema, Schema};
3use alloc::borrow::Cow;
4use url2::Url;
5
6impl JsonSchema for Url {
7    inline_schema!();
8
9    fn schema_name() -> Cow<'static, str> {
10        "Url".into()
11    }
12
13    fn schema_id() -> Cow<'static, str> {
14        "url::Url".into()
15    }
16
17    fn json_schema(_: &mut SchemaGenerator) -> Schema {
18        json_schema!({
19            "type": "string",
20            "format": "uri",
21        })
22    }
23}