rydantic 0.7.0

Type-driven validation, JSON Schema, Cap'n Proto, Axum and SQLx models for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[test]
fn invalid_declarations_and_mutation_are_compile_errors() {
    let tests = trybuild::TestCases::new();
    tests.compile_fail("tests/ui/*.rs");
    #[cfg(feature = "capnp")]
    tests.compile_fail("tests/ui-capnp/*.rs");
    #[cfg(feature = "sqlx")]
    tests.compile_fail("tests/ui-sql/*.rs");
}

#[test]
fn callback_paths_are_not_shadowed_by_generated_locals() {
    let tests = trybuild::TestCases::new();
    tests.pass("tests/ui-pass/*.rs");
}