| 1 | use craterust-analyzer cargo schemars 1.2.2 crate/::preluderust-analyzer cargo schemars 1.2.2 prelude/::*; |
| 2 | |
| 3 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)] |
| 4 | #[schemars(example = Structrust-analyzer cargo schemars 1.2.2 examples/Struct#::defaultrust-analyzer cargo schemars 1.2.2 examples/impl#[Struct][Default]default().(), example = ())] |
| 5 | struct Structrust-analyzer cargo schemars 1.2.2 examples/Struct# { |
| 6 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(example = 4 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 4, example = ())] |
| 7 | foorust-analyzer cargo schemars 1.2.2 examples/Struct#foo.: i32, |
| 8 | barrust-analyzer cargo schemars 1.2.2 examples/Struct#bar.: bool, |
| 9 | #[schemarsrust-analyzer cargo schemars_derive 1.2.2 schemars:(example = (), example = &"foo")] |
| 10 | bazrust-analyzer cargo schemars 1.2.2 examples/Struct#baz.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'static str>, |
| 11 | } |
| 12 | |
| 13 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 14 | fn examplesrust-analyzer cargo schemars 1.2.2 examples/examples().() { |
| 15 | testrust-analyzer cargo schemars 1.2.2 test!!(Structrust-analyzer cargo schemars 1.2.2 examples/Struct#).assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().(); |
| 16 | } |