File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1037,20 +1037,21 @@ pub async fn run(
10371037 } ;
10381038
10391039 // Define VertextApiDoc conditionally only if the "google" feature is enabled
1040- #[ cfg( feature = "google" ) ]
1041- #[ derive( OpenApi ) ]
1042- #[ openapi(
1043- paths( vertex_compatibility) ,
1044- components( schemas( VertexInstance , VertexRequest , VertexResponse ) )
1045- ) ]
1046- struct VertextApiDoc ;
1047-
10481040 let doc = {
10491041 // avoid `mut` if possible
10501042 #[ cfg( feature = "google" ) ]
10511043 {
1044+ use crate :: VertexInstance ;
1045+
1046+ #[ derive( OpenApi ) ]
1047+ #[ openapi(
1048+ paths( vertex_compatibility) ,
1049+ components( schemas( VertexInstance , VertexRequest , VertexResponse ) )
1050+ ) ]
1051+ struct VertextApiDoc ;
1052+
10521053 // limiting mutability to the smallest scope necessary
1053- let mut doc = doc ;
1054+ let mut doc = ApiDoc :: openapi ( ) ;
10541055 doc. merge ( VertextApiDoc :: openapi ( ) ) ;
10551056 doc
10561057 }
You can’t perform that action at this time.
0 commit comments