@@ -19,7 +19,7 @@ use std::collections::HashMap;
1919use std:: fmt:: Write ;
2020
2121use anyhow:: { anyhow, bail} ;
22- use clients_schema:: { Flavor , Property } ;
22+ use clients_schema:: { Property } ;
2323use indexmap:: IndexMap ;
2424use indexmap:: indexmap;
2525use icu_segmenter:: SentenceSegmenter ;
@@ -37,8 +37,7 @@ use crate::convert_availabilities;
3737pub fn add_endpoint (
3838 endpoint : & clients_schema:: Endpoint ,
3939 tac : & mut TypesAndComponents ,
40- out : & mut Paths ,
41- flavor : & Option < Flavor >
40+ out : & mut Paths
4241) -> anyhow:: Result < ( ) > {
4342 if endpoint. request . is_none ( ) {
4443 // tracing::warn!("Endpoint {} is missing a request -- ignored", &endpoint.name);
@@ -256,7 +255,7 @@ pub fn add_endpoint(
256255 let sum_desc = split_summary_desc ( & endpoint. description ) ;
257256
258257 // add the x-state extension for availability
259- let mut extensions = crate :: availability_as_extensions ( & endpoint. availability , flavor) ;
258+ let mut extensions = crate :: availability_as_extensions ( & endpoint. availability , & tac . config . flavor ) ;
260259
261260 // add the x-codeSamples extension
262261 let mut code_samples = vec ! [ ] ;
@@ -290,7 +289,7 @@ pub fn add_endpoint(
290289 if !code_samples. is_empty ( ) {
291290 extensions. insert ( "x-codeSamples" . to_string ( ) , serde_json:: json!( code_samples) ) ;
292291 }
293- let mut ext_availability = crate :: availability_as_extensions ( & endpoint. availability , flavor) ;
292+ let mut ext_availability = crate :: availability_as_extensions ( & endpoint. availability , & tac . config . flavor ) ;
294293 extensions. append ( & mut ext_availability) ;
295294
296295 // Create the operation, it will be repeated if we have several methods
0 commit comments