@@ -23,44 +23,13 @@ use pact_models::v4::async_message::AsynchronousMessage;
2323use pact_models:: v4:: message_parts:: MessageContents ;
2424use pact_models:: v4:: sync_message:: SynchronousMessage ;
2525use serde_json:: { self , Value } ;
26- #[ cfg( feature = "xml" ) ] use sxd_document:: dom:: Document ;
2726use tracing:: { debug, error, trace} ;
2827
2928use crate :: { CoreMatchingContext , DiffConfig , MatchingContext } ;
3029use crate :: json:: compare_json;
3130
3231pub mod bodies;
3332
34- /// Implementation of a content type handler for XML (currently unimplemented).
35- #[ cfg( feature = "xml" ) ]
36- pub struct XmlHandler < ' a > {
37- /// XML document to apply the generators to.
38- pub value : Document < ' a >
39- }
40-
41- #[ cfg( feature = "xml" ) ]
42- impl < ' a > pact_models:: generators:: ContentTypeHandler < Document < ' a > > for XmlHandler < ' a > {
43- fn process_body (
44- & mut self ,
45- _generators : & HashMap < DocPath , Generator > ,
46- _mode : & GeneratorTestMode ,
47- _context : & HashMap < & str , Value > ,
48- _matcher : & Box < dyn VariantMatcher + Send + Sync >
49- ) -> Result < OptionalBody , String > {
50- error ! ( "UNIMPLEMENTED: Generators are not currently supported with XML" ) ;
51- Err ( "Generators are not supported with XML" . to_string ( ) )
52- }
53-
54- fn apply_key (
55- & mut self ,
56- _key : & DocPath ,
57- _generator : & dyn GenerateValue < Document < ' a > > ,
58- _context : & HashMap < & str , Value > ,
59- _matcher : & Box < dyn VariantMatcher + Send + Sync >
60- ) {
61- error ! ( "UNIMPLEMENTED: Generators are not currently supported with XML" ) ;
62- }
63- }
6433
6534/// Apply the generators to the body, returning a new body
6635#[ deprecated( note = "moved to the generators::bodies module" , since = "0.12.16" ) ]
0 commit comments