schemars 1.2.1

Generate JSON Schemas from Rust code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::prelude::*;
use url2::Url;

#[test]
fn url() {
    test!(Url)
        .assert_snapshot()
        .assert_allows_ser_roundtrip(
            ["http://example.com", "data:text/plain,test"]
                .iter()
                .map(|s| s.parse().unwrap()),
        )
        .assert_matches_de_roundtrip(arbitrary_values());
}