@@ -382,23 +382,9 @@ impl ParameterDataExt for openapiv3::ParameterData {
382382
383383trait  ExtractJsonMediaType  { 
384384    fn  is_binary ( & self )  -> Result < bool > ; 
385-     fn  content_json ( & self )  -> Result < openapiv3:: MediaType > ; 
386385} 
387386
388387impl  ExtractJsonMediaType  for  openapiv3:: Response  { 
389-     fn  content_json ( & self )  -> Result < openapiv3:: MediaType >  { 
390-         // We do not need to check the length of the content because there might be 
391-         // more than one. For example, if xml or some other format is also defined. 
392-         if  let  Some ( mt)  = self . content . get ( "application/json" )  { 
393-             Ok ( mt. clone ( ) ) 
394-         }  else  { 
395-             bail ! ( 
396-                 "could not find application/json, only found {}" , 
397-                 self . content. keys( ) . next( ) . unwrap( ) 
398-             ) ; 
399-         } 
400-     } 
401- 
402388    fn  is_binary ( & self )  -> Result < bool >  { 
403389        if  self . content . is_empty ( )  { 
404390            /* 
@@ -460,19 +446,6 @@ impl ExtractJsonMediaType for openapiv3::Response {
460446} 
461447
462448impl  ExtractJsonMediaType  for  openapiv3:: RequestBody  { 
463-     fn  content_json ( & self )  -> Result < openapiv3:: MediaType >  { 
464-         // We do not need to check the length of the content because there might be 
465-         // more than one. For example, if xml or some other format is also defined. 
466-         if  let  Some ( mt)  = self . content . get ( "application/json" )  { 
467-             Ok ( mt. clone ( ) ) 
468-         }  else  { 
469-             bail ! ( 
470-                 "could not find application/json, only found {}" , 
471-                 self . content. keys( ) . next( ) . unwrap( ) 
472-             ) ; 
473-         } 
474-     } 
475- 
476449    fn  is_binary ( & self )  -> Result < bool >  { 
477450        if  self . content . is_empty ( )  { 
478451            /* 
0 commit comments