Remove unneeded feature dependency
This commit is contained in:
parent
09a73d3ee5
commit
6483cd5e63
3 changed files with 2 additions and 30 deletions
|
@ -13,7 +13,7 @@ version.workspace = true
|
|||
|
||||
[dependencies]
|
||||
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]
|
||||
axum = "0.8"
|
||||
|
|
28
vendor/axum-typed-routing/examples/aide.rs
vendored
28
vendor/axum-typed-routing/examples/aide.rs
vendored
|
@ -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());
|
||||
}
|
2
vendor/axum-typed-routing/src/lib.rs
vendored
2
vendor/axum-typed-routing/src/lib.rs
vendored
|
@ -26,7 +26,7 @@
|
|||
//!
|
||||
//! 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;
|
||||
|
|
Loading…
Add table
Reference in a new issue