chore: update dependencies and remove unused test modules
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
0abb76e785
commit
24d7c4742c
@@ -1,23 +0,0 @@
|
||||
use axum::{Router, Json};
|
||||
use utoipa::OpenApi;
|
||||
use utoipa_swagger_ui::SwaggerUi;
|
||||
use crate::modes::server::AppState;
|
||||
|
||||
#[derive(OpenApi)]
|
||||
#[openapi(
|
||||
info(
|
||||
title = "Keep API",
|
||||
version = "0.1.0",
|
||||
description = "Keep and manage temporary files with automatic compression and metadata generation"
|
||||
)
|
||||
)]
|
||||
struct ApiDoc;
|
||||
|
||||
pub fn add_routes(router: Router<AppState>) -> Router<AppState> {
|
||||
router
|
||||
// Documentation endpoints
|
||||
.merge(SwaggerUi::new("/swagger").url("/openapi.json", ApiDoc::openapi()))
|
||||
.route("/openapi.json", axum::routing::get(|| async {
|
||||
Json(ApiDoc::openapi())
|
||||
}))
|
||||
}
|
||||
@@ -31,7 +31,7 @@ fn default_count() -> usize {
|
||||
pub fn add_routes(app: axum::Router<AppState>) -> axum::Router<AppState> {
|
||||
app
|
||||
.route("/", axum::routing::get(list_items))
|
||||
.route("/item/:id", axum::routing::get(show_item))
|
||||
.route("/item/{item_id}", axum::routing::get(show_item))
|
||||
}
|
||||
|
||||
async fn list_items(
|
||||
|
||||
Reference in New Issue
Block a user