@@ -23,44 +23,13 @@ use pact_models::v4::async_message::AsynchronousMessage;
23
23
use pact_models:: v4:: message_parts:: MessageContents ;
24
24
use pact_models:: v4:: sync_message:: SynchronousMessage ;
25
25
use serde_json:: { self , Value } ;
26
- #[ cfg( feature = "xml" ) ] use sxd_document:: dom:: Document ;
27
26
use tracing:: { debug, error, trace} ;
28
27
29
28
use crate :: { CoreMatchingContext , DiffConfig , MatchingContext } ;
30
29
use crate :: json:: compare_json;
31
30
32
31
pub mod bodies;
33
32
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
- }
64
33
65
34
/// Apply the generators to the body, returning a new body
66
35
#[ deprecated( note = "moved to the generators::bodies module" , since = "0.12.16" ) ]
0 commit comments