@@ -4,6 +4,7 @@ use std::collections::HashSet;
44use std:: str:: FromStr ;
55
66#[ derive( Debug , PartialEq ) ]
7+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
78pub enum Form {
89 Empty ,
910 Ref ( Ref ) ,
@@ -22,18 +23,21 @@ impl Default for Form {
2223}
2324
2425#[ derive( Debug , PartialEq ) ]
26+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
2527pub struct Ref {
2628 pub nullable : bool ,
2729 pub definition : String ,
2830}
2931
3032#[ derive( Debug , PartialEq ) ]
33+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
3134pub struct Type {
3235 pub nullable : bool ,
3336 pub type_value : TypeValue ,
3437}
3538
3639#[ derive( Debug , PartialEq ) ]
40+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
3741pub enum TypeValue {
3842 Boolean ,
3943 Float32 ,
@@ -70,18 +74,21 @@ impl FromStr for TypeValue {
7074}
7175
7276#[ derive( Debug , PartialEq ) ]
77+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
7378pub struct Enum {
7479 pub nullable : bool ,
7580 pub values : HashSet < String > ,
7681}
7782
7883#[ derive( Debug , PartialEq ) ]
84+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
7985pub struct Elements {
8086 pub nullable : bool ,
8187 pub schema : Box < Schema > ,
8288}
8389
8490#[ derive( Debug , PartialEq ) ]
91+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
8592pub struct Properties {
8693 pub nullable : bool ,
8794 pub required : HashMap < String , Schema > ,
@@ -91,12 +98,14 @@ pub struct Properties {
9198}
9299
93100#[ derive( Debug , PartialEq ) ]
101+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
94102pub struct Values {
95103 pub nullable : bool ,
96104 pub schema : Box < Schema > ,
97105}
98106
99107#[ derive( Debug , PartialEq ) ]
108+ #[ cfg_attr( feature = "fuzz" , derive( arbitrary:: Arbitrary ) ) ]
100109pub struct Discriminator {
101110 pub nullable : bool ,
102111 pub discriminator : String ,
0 commit comments