@@ -18,7 +18,7 @@ use tokio_util::io::ReaderStream;
1818use crate :: common:: constant:: { DEFAULT_TENANT , FILE_SERVICE_COLLECTION_NAME , TMP_FS_PATH } ;
1919use crate :: common:: domain:: ServiceError ;
2020use crate :: common:: util:: {
21- IdGenerator , OpenApiBinaryResponse , OpenApiDocUploadForm , StoreCollection ,
21+ IdGenerator , OpenApiBinaryResponse , OpenApiDocUploadForm , OpenApiDocUploadFormSimpleFile , StoreCollection
2222} ;
2323use crate :: store:: { Repository , StoreClient , StoreRepository } ;
2424use crate :: upload:: domain:: { DownloadBulkRequestUriParams , FindAllQueryParams } ;
@@ -39,6 +39,8 @@ pub async fn make_state(client: StoreClient) -> Result<FileRouterState, Box<dyn
3939#[ utoipa:: path(
4040 get,
4141 path = "/api/v1/upload/metadata" ,
42+ tags = [ "upload::routes::metadata" ] ,
43+ operation_id = "metadata" ,
4244 params( DownloadFileRequestUriParams ) ,
4345 responses(
4446 ( status = 200 , description = "Get upload metadata" , body=FileUploadV2 )
@@ -64,6 +66,8 @@ pub async fn metadata(
6466#[ utoipa:: path(
6567 post,
6668 path = "/api/v1/upload/download-bulk" ,
69+ tags = [ "upload::routes::download-bulk" ] ,
70+ operation_id = "download-bulk" ,
6771 request_body=DownloadBulkRequestUriParams ,
6872 responses(
6973 ( status = 200 , description = "Download multiple files as a zip" , content_type = "*/*" , body=inline( OpenApiBinaryResponse ) )
@@ -114,6 +118,8 @@ pub async fn download_bulk(
114118#[ utoipa:: path(
115119 get,
116120 path = "/api/v1/upload/download" ,
121+ tags = [ "upload::routes::fetch-by-id" ] ,
122+ operation_id = "download" ,
117123 params( DownloadFileRequestUriParams ) ,
118124 responses(
119125 ( status = 200 , description = "Download file" , content_type = "*/*" , body=inline( OpenApiBinaryResponse ) )
@@ -165,6 +171,8 @@ pub async fn download(
165171#[ utoipa:: path(
166172 get,
167173 path = "/api/v1/upload/find-all" ,
174+ tags = [ "upload::routes::fetch-all" ] ,
175+ operation_id = "find-all" ,
168176 params( FindAllQueryParams ) ,
169177 responses(
170178 ( status = 200 , description = "Find all upload" , body=Vec <FileUploadV2 >)
@@ -197,6 +205,8 @@ pub async fn find_all_uploads(
197205#[ utoipa:: path(
198206 delete,
199207 path = "/api/v1/upload/{id}" ,
208+ tags = [ "upload::routes::upl-delete" ] ,
209+ operation_id = "delete" ,
200210 responses(
201211 ( status = 200 , description = "Delete a file by id" )
202212 ) ,
@@ -234,6 +244,8 @@ pub async fn delete_by_id(
234244#[ utoipa:: path(
235245 get,
236246 path = "/api/v1/upload/ping" ,
247+ tags = [ "upload::routes::ping" ] ,
248+ operation_id = "ping" ,
237249 responses(
238250 ( status = 200 , description = "Ping" )
239251 ) ,
@@ -245,6 +257,8 @@ pub async fn ping() -> impl IntoResponse {
245257#[ utoipa:: path(
246258 post,
247259 path = "/api/v1/upload/{id}/make-thumb" ,
260+ tags = [ "upload::routes::make-thumb" ] ,
261+ operation_id = "make-thumb" ,
248262 responses(
249263 ( status = 200 , description = "Make thumbnail" , body=Option <FileUploadV2 >)
250264 ) ,
@@ -295,8 +309,10 @@ pub async fn make_thumb(
295309#[ utoipa:: path(
296310 post,
297311 path = "/api/v1/upload/{id}/update" ,
298- params( UploadFileRequestUriParams ) ,
299- request_body( content = inline( OpenApiDocUploadForm ) , content_type = "multipart/form-data" ) ,
312+ tags = [ "upload::routes::upload-update" ] ,
313+ operation_id = "update" ,
314+ operation_id = "upload_update" ,
315+ request_body( content = inline( OpenApiDocUploadFormSimpleFile ) , content_type = "multipart/form-data" ) ,
300316 responses(
301317 ( status = 200 , description = "Upload a file" , body=FileUploadV2 )
302318 ) ,
@@ -368,6 +384,8 @@ pub async fn upload_update(
368384#[ utoipa:: path(
369385 post,
370386 path = "/api/v1/upload" ,
387+ tags = [ "upload::routes::streamupload" ] ,
388+ operation_id = "upload" ,
371389 params( UploadFileRequestUriParams ) ,
372390 request_body( content = inline( OpenApiDocUploadForm ) , content_type = "multipart/form-data" ) ,
373391 responses(
0 commit comments