@@ -175,7 +175,7 @@ impl<'t> TransformOpenApi<'t> {
175175 pub fn default_response_with < R , F > ( self , transform : F ) -> Self
176176 where
177177 R : OperationOutput ,
178- F : Fn ( TransformResponse < R :: Inner > ) -> TransformResponse < R :: Inner > + Clone ,
178+ F : Fn ( TransformResponse < ' _ , R :: Inner > ) -> TransformResponse < ' _ , R :: Inner > + Clone ,
179179 {
180180 if let Some ( p) = & mut self . api . paths {
181181 for ( _, p) in & mut p. paths {
@@ -393,7 +393,7 @@ impl<'t> TransformPathItem<'t> {
393393 pub fn default_response_with < R , F > ( self , transform : F ) -> Self
394394 where
395395 R : OperationOutput ,
396- F : Fn ( TransformResponse < R :: Inner > ) -> TransformResponse < R :: Inner > + Clone ,
396+ F : Fn ( TransformResponse < ' _ , R :: Inner > ) -> TransformResponse < ' _ , R :: Inner > + Clone ,
397397 {
398398 in_context ( |ctx| ctx. show_error = filter_no_duplicate_response) ;
399399
@@ -558,7 +558,7 @@ impl<'t> TransformOperation<'t> {
558558 pub fn parameter < T , F > ( self , name : & str , transform : F ) -> Self
559559 where
560560 T : Serialize ,
561- F : FnOnce ( TransformParameter < T > ) -> TransformParameter < T > ,
561+ F : FnOnce ( TransformParameter < ' _ , T > ) -> TransformParameter < ' _ , T > ,
562562 {
563563 let ( idx, param) = match self
564564 . operation
@@ -601,7 +601,7 @@ impl<'t> TransformOperation<'t> {
601601 #[ tracing:: instrument( skip_all, fields( operation_id = self . operation. operation_id) ) ]
602602 pub fn parameter_untyped < F > ( self , name : & str , transform : F ) -> Self
603603 where
604- F : FnOnce ( TransformParameter < ( ) > ) -> TransformParameter < ( ) > ,
604+ F : FnOnce ( TransformParameter < ' _ , ( ) > ) -> TransformParameter < ' _ , ( ) > ,
605605 {
606606 self . parameter ( name, transform)
607607 }
@@ -644,7 +644,7 @@ impl<'t> TransformOperation<'t> {
644644 pub fn default_response_with < R , F > ( self , transform : F ) -> Self
645645 where
646646 R : OperationOutput ,
647- F : FnOnce ( TransformResponse < R :: Inner > ) -> TransformResponse < R :: Inner > ,
647+ F : FnOnce ( TransformResponse < ' _ , R :: Inner > ) -> TransformResponse < ' _ , R :: Inner > ,
648648 {
649649 in_context ( |ctx| {
650650 if let Some ( mut res) = R :: operation_response ( ctx, self . operation ) {
@@ -707,7 +707,7 @@ impl<'t> TransformOperation<'t> {
707707 pub fn response_with < const N : u16 , R , F > ( self , transform : F ) -> Self
708708 where
709709 R : OperationOutput ,
710- F : FnOnce ( TransformResponse < R :: Inner > ) -> TransformResponse < R :: Inner > ,
710+ F : FnOnce ( TransformResponse < ' _ , R :: Inner > ) -> TransformResponse < ' _ , R :: Inner > ,
711711 {
712712 if self . operation . responses . is_none ( ) {
713713 self . operation . responses = Some ( Default :: default ( ) ) ;
@@ -777,7 +777,7 @@ impl<'t> TransformOperation<'t> {
777777 pub fn response_range_with < const N : u16 , R , F > ( self , transform : F ) -> Self
778778 where
779779 R : OperationOutput ,
780- F : FnOnce ( TransformResponse < R :: Inner > ) -> TransformResponse < R :: Inner > ,
780+ F : FnOnce ( TransformResponse < ' _ , R :: Inner > ) -> TransformResponse < ' _ , R :: Inner > ,
781781 {
782782 if self . operation . responses . is_none ( ) {
783783 self . operation . responses = Some ( Default :: default ( ) ) ;
@@ -812,7 +812,7 @@ impl<'t> TransformOperation<'t> {
812812 self ,
813813 callback_name : & str ,
814814 callback_url : & str ,
815- callback_transform : impl FnOnce ( TransformCallback ) -> TransformCallback ,
815+ callback_transform : impl FnOnce ( TransformCallback < ' _ > ) -> TransformCallback < ' _ > ,
816816 ) -> Self {
817817 let callbacks = self
818818 . operation
@@ -1115,7 +1115,10 @@ impl<'t> TransformCallback<'t> {
11151115
11161116 /// Add a "delete" callback operation.
11171117 #[ allow( clippy:: missing_panics_doc) ]
1118- pub fn delete ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1118+ pub fn delete (
1119+ self ,
1120+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1121+ ) -> Self {
11191122 let op = match & mut self . path . delete {
11201123 Some ( op) => op,
11211124 None => {
@@ -1135,7 +1138,10 @@ impl<'t> TransformCallback<'t> {
11351138
11361139 /// Add a "get" callback operation.
11371140 #[ allow( clippy:: missing_panics_doc) ]
1138- pub fn get ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1141+ pub fn get (
1142+ self ,
1143+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1144+ ) -> Self {
11391145 let op = match & mut self . path . get {
11401146 Some ( op) => op,
11411147 None => {
@@ -1155,7 +1161,10 @@ impl<'t> TransformCallback<'t> {
11551161
11561162 /// Add a "head" callback operation.
11571163 #[ allow( clippy:: missing_panics_doc) ]
1158- pub fn head ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1164+ pub fn head (
1165+ self ,
1166+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1167+ ) -> Self {
11591168 let op = match & mut self . path . head {
11601169 Some ( op) => op,
11611170 None => {
@@ -1175,7 +1184,10 @@ impl<'t> TransformCallback<'t> {
11751184
11761185 /// Add a "options" callback operation.
11771186 #[ allow( clippy:: missing_panics_doc) ]
1178- pub fn options ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1187+ pub fn options (
1188+ self ,
1189+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1190+ ) -> Self {
11791191 let op = match & mut self . path . options {
11801192 Some ( op) => op,
11811193 None => {
@@ -1195,7 +1207,10 @@ impl<'t> TransformCallback<'t> {
11951207
11961208 /// Add a "patch" callback operation.
11971209 #[ allow( clippy:: missing_panics_doc) ]
1198- pub fn patch ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1210+ pub fn patch (
1211+ self ,
1212+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1213+ ) -> Self {
11991214 let op = match & mut self . path . patch {
12001215 Some ( op) => op,
12011216 None => {
@@ -1215,7 +1230,10 @@ impl<'t> TransformCallback<'t> {
12151230
12161231 /// Add a "post" callback operation.
12171232 #[ allow( clippy:: missing_panics_doc) ]
1218- pub fn post ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1233+ pub fn post (
1234+ self ,
1235+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1236+ ) -> Self {
12191237 let op = match & mut self . path . post {
12201238 Some ( op) => op,
12211239 None => {
@@ -1235,7 +1253,10 @@ impl<'t> TransformCallback<'t> {
12351253
12361254 /// Add a "put" callback operation.
12371255 #[ allow( clippy:: missing_panics_doc) ]
1238- pub fn put ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1256+ pub fn put (
1257+ self ,
1258+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1259+ ) -> Self {
12391260 let op = match & mut self . path . put {
12401261 Some ( op) => op,
12411262 None => {
@@ -1255,7 +1276,10 @@ impl<'t> TransformCallback<'t> {
12551276
12561277 /// Add a "trace" callback operation.
12571278 #[ allow( clippy:: missing_panics_doc) ]
1258- pub fn trace ( self , operation : impl FnOnce ( TransformOperation ) -> TransformOperation ) -> Self {
1279+ pub fn trace (
1280+ self ,
1281+ operation : impl FnOnce ( TransformOperation < ' _ > ) -> TransformOperation < ' _ > ,
1282+ ) -> Self {
12591283 let op = match & mut self . path . trace {
12601284 Some ( op) => op,
12611285 None => {
@@ -1274,7 +1298,10 @@ impl<'t> TransformCallback<'t> {
12741298 }
12751299
12761300 /// Apply an another transform function.
1277- pub fn path ( mut self , transform : impl FnOnce ( TransformPathItem ) -> TransformPathItem ) -> Self {
1301+ pub fn path (
1302+ mut self ,
1303+ transform : impl FnOnce ( TransformPathItem < ' _ > ) -> TransformPathItem < ' _ > ,
1304+ ) -> Self {
12781305 let t = transform ( TransformPathItem :: new ( self . path ) ) ;
12791306
12801307 if t. hidden {
0 commit comments