Remove unneeded feature dependency

This commit is contained in:
Tristan D. 2025-03-09 23:09:30 +01:00
parent 09a73d3ee5
commit 6483cd5e63
Signed by: tristan
SSH key fingerprint: SHA256:9oFM1J63hYWJjCnLG6C0fxBS15rwNcWwdQNMOHYKJ/4
3 changed files with 2 additions and 30 deletions

View file

@ -13,7 +13,7 @@ version.workspace = true
[dependencies] [dependencies]
axum-controller-macros = { path = "../axum-controller-macros", version = "0.2.1" } axum-controller-macros = { path = "../axum-controller-macros", version = "0.2.1" }
axum-typed-routing = { path = "../vendor/axum-typed-routing", version = "0.2.0", features = [ "aide"] } axum-typed-routing = { path = "../vendor/axum-typed-routing", version = "0.2.0" }
[dev-dependencies] [dev-dependencies]
axum = "0.8" axum = "0.8"

View file

@ -1,28 +0,0 @@
#![allow(unused)]
use aide::axum::ApiRouter;
use axum::extract::{Json, State};
use axum_typed_routing::TypedApiRouter;
use axum_typed_routing_macros::api_route;
#[api_route(GET "/item/:id?amount&offset" {
summary: "Get an item",
description: "Get an item by id",
id: "get-item",
tags: ["items"],
hidden: false
})]
async fn item_handler(
id: u32,
amount: Option<u32>,
offset: Option<u32>,
State(state): State<String>,
Json(json): Json<u32>,
) -> String {
todo!("handle request")
}
fn main() {
let router: ApiRouter = ApiRouter::new()
.typed_api_route(item_handler)
.with_state("state".to_string());
}

View file

@ -26,7 +26,7 @@
//! //!
//! Please read the [`aide`] documentation for more information on usage. //! Please read the [`aide`] documentation for more information on usage.
//! ``` //! ```
#![doc = include_str!("../examples/aide.rs")] // #![doc = include_str!("../examples/aide.rs")]
//! ``` //! ```
use axum::routing::MethodRouter; use axum::routing::MethodRouter;