ruwuma/crates/ruma-common/tests/it/api/ruma_api.rs
Kévin Commaille f05d0e03a1 api: Disallow #[serde(flatten)] for single-body-fields of requests and responses
`#[ruma_api(body)]` must be used instead.
2024-12-15 03:07:49 -05:00

12 lines
526 B
Rust

#[test]
fn ui() {
let t = trybuild::TestCases::new();
t.pass("tests/it/api/ui/api-sanity-check.rs");
t.pass("tests/it/api/ui/move-value.rs");
t.pass("tests/it/api/ui/request-only.rs");
t.pass("tests/it/api/ui/response-only.rs");
t.compile_fail("tests/it/api/ui/deprecated-without-added.rs");
t.compile_fail("tests/it/api/ui/removed-without-deprecated.rs");
t.compile_fail("tests/it/api/ui/serde-flatten-request-body.rs");
t.compile_fail("tests/it/api/ui/serde-flatten-response-body.rs");
}