@@ -27,10 +27,13 @@ use crate::{
2727 prelude:: { Validate , ValidationResult } ,
2828 validation:: ValidationContext ,
2929} ;
30+ #[ cfg( feature = "serde" ) ]
31+ use serde:: { Deserialize , Serialize } ;
3032
3133use super :: bom:: SpecVersion ;
3234
3335#[ derive( Clone , Debug , PartialEq , Eq ) ]
36+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
3437pub struct Annotations ( pub Vec < Annotation > ) ;
3538
3639impl Validate for Annotations {
@@ -44,6 +47,7 @@ impl Validate for Annotations {
4447}
4548
4649#[ derive( Clone , Debug , PartialEq , Eq ) ]
50+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
4751pub struct Annotation {
4852 pub bom_ref : Option < String > ,
4953 pub subjects : Vec < String > ,
@@ -64,6 +68,7 @@ impl Validate for Annotation {
6468
6569/// Represents an Annotator: organization, individual, component or service.
6670#[ derive( Clone , Debug , PartialEq , Eq ) ]
71+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
6772pub enum Annotator {
6873 Organization ( OrganizationalEntity ) ,
6974 Individual ( OrganizationalContact ) ,
0 commit comments