Debian Codegraph @

tests/integration/crate_alias.rs

raw symbols SCIP
1 use crate::prelude::*;
2 use ::schemars as aliased_schemars;
3
4 #[allow(dead_code)]
5 #[derive(aliased_schemars::JsonSchema, Deserialize, Serialize, Default)]
6 #[schemars(crate = "aliased_schemars")]
7 struct MyStruct {
8 /// Is it ok with doc comments?
9 foo: i32,
10 #[schemars(extend("x-test" = "...and extensions?"))]
11 bar: bool,
12 }
13
14 #[test]
15 fn crate_alias() {
16 test!(MyStruct)
17 .assert_allows_ser_roundtrip_default()
18 .assert_matches_de_roundtrip(arbitrary_values());
19 }