| 1 | use craterust-analyzer cargo schemars 1.2.2 crate/::preluderust-analyzer cargo schemars 1.2.2 prelude/::*; |
| 2 | use schemarsrust-analyzer cargo schemars 1.2.2 crate/::generaterust-analyzer cargo schemars 1.2.2 generate/::SchemaSettingsrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#; |
| 3 | |
| 4 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 5 | struct MyJobrust-analyzer cargo schemars 1.2.2 inline_subschemas/MyJob# { |
| 6 | specrust-analyzer cargo schemars 1.2.2 inline_subschemas/MyJob#spec.: MyJobSpecrust-analyzer cargo schemars 1.2.2 inline_subschemas/MyJobSpec#, |
| 7 | } |
| 8 | |
| 9 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 10 | struct MyJobSpecrust-analyzer cargo schemars 1.2.2 inline_subschemas/MyJobSpec# { |
| 11 | replicasrust-analyzer cargo schemars 1.2.2 inline_subschemas/MyJobSpec#replicas.: u32, |
| 12 | } |
| 13 | |
| 14 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 15 | fn struct_normalrust-analyzer cargo schemars 1.2.2 inline_subschemas/struct_normal().() { |
| 16 | let settings = SchemaSettingsrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#::defaultrust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings][Default]default().().withrust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings]with().(|s| s.inline_subschemasrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#inline_subschemas. = true); |
| 17 | testrust-analyzer cargo schemars 1.2.2 test!!(MyJobrust-analyzer cargo schemars 1.2.2 inline_subschemas/MyJob#, settings) |
| 18 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 19 | .assert_allows_ser_roundtrip_defaultrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip_default().() |
| 20 | .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().()); |
| 21 | } |
| 22 | |
| 23 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)] |
| 24 | struct RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter# { |
| 25 | directrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#direct.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#>>, |
| 26 | indirectrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#indirect.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<RecursiveInnerrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveInner#>>, |
| 27 | } |
| 28 | |
| 29 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(JsonSchemarust-analyzer cargo schemars_derive 1.2.2 JsonSchema:, Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:, Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:)] |
| 30 | struct RecursiveInnerrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveInner# { |
| 31 | recursiverust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveInner#recursive.: RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#, |
| 32 | } |
| 33 | |
| 34 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 35 | fn struct_recursiverust-analyzer cargo schemars 1.2.2 inline_subschemas/struct_recursive().() { |
| 36 | let settings = SchemaSettingsrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#::defaultrust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings][Default]default().().withrust-analyzer cargo schemars 1.2.2 generate/impl#[SchemaSettings]with().(|s| s.inline_subschemasrust-analyzer cargo schemars 1.2.2 generate/SchemaSettings#inline_subschemas. = true); |
| 37 | testrust-analyzer cargo schemars 1.2.2 test!!(RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#, settings) |
| 38 | .assert_snapshotrust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_snapshot().() |
| 39 | .assert_allows_ser_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_allows_ser_roundtrip().([ |
| 40 | RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter# { |
| 41 | directrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#direct.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 42 | indirectrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#indirect.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 43 | }, |
| 44 | RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter# { |
| 45 | directrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#direct.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter# { |
| 46 | directrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#direct.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 47 | indirectrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#indirect.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 48 | })), |
| 49 | indirectrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#indirect.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(RecursiveInnerrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveInner# { |
| 50 | recursiverust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveInner#recursive.: RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter# { |
| 51 | directrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#direct.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(RecursiveOuterrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter# { |
| 52 | directrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#direct.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 53 | indirectrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#indirect.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 54 | })), |
| 55 | indirectrust-analyzer cargo schemars 1.2.2 inline_subschemas/RecursiveOuter#indirect.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 56 | }, |
| 57 | })), |
| 58 | }, |
| 59 | ]) |
| 60 | .assert_matches_de_roundtriprust-analyzer cargo schemars 1.2.2 test_helper/impl#[`TestHelper<T>`]assert_matches_de_roundtrip().(arbitrary_valuesrust-analyzer cargo schemars 1.2.2 test_helper/arbitrary_values().()); |
| 61 | } |