Debian Codegraph @

tests/integration/examples.rs

raw symbols SCIP
1 use crate::prelude::*;
2
3 #[derive(Default, JsonSchema, Serialize)]
4 #[schemars(example = Struct::default(), example = ())]
5 struct Struct {
6 #[schemars(example = 4 + 4, example = ())]
7 foo: i32,
8 bar: bool,
9 #[schemars(example = (), example = &"foo")]
10 baz: Option<&'static str>,
11 }
12
13 #[test]
14 fn examples() {
15 test!(Struct).assert_snapshot();
16 }