From 5ed75dbcb64d38adfa9a0af5627da09d53810d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Nieto?= Date: Wed, 6 Mar 2024 15:40:41 +0100 Subject: [PATCH] fix(aide-axum-typed-multipart): fixed doctest --- crates/aide-axum-typed-multipart/Cargo.toml | 4 ++++ crates/aide-axum-typed-multipart/README.md | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/aide-axum-typed-multipart/Cargo.toml b/crates/aide-axum-typed-multipart/Cargo.toml index 5b53422..234bff9 100644 --- a/crates/aide-axum-typed-multipart/Cargo.toml +++ b/crates/aide-axum-typed-multipart/Cargo.toml @@ -15,3 +15,7 @@ axum = "0.7.4" axum_typed_multipart = { version = "0.11.0" } indexmap = "2.2.2" schemars = "0.8.16" + +[dev-dependencies] +bytes = "1.5.0" +schemars = { version = "0.8.16" , features = ["bytes"]} diff --git a/crates/aide-axum-typed-multipart/README.md b/crates/aide-axum-typed-multipart/README.md index 21f2609..8ec3f80 100644 --- a/crates/aide-axum-typed-multipart/README.md +++ b/crates/aide-axum-typed-multipart/README.md @@ -7,7 +7,8 @@ to generate documentation for multipart requests. ```rust use aide_axum_typed_multipart::{FieldData, TypedMultipart}; -use axum::{body::Bytes, http::StatusCode}; +use axum::{http::StatusCode}; +use bytes::Bytes; use axum_typed_multipart::TryFromMultipart; use schemars::JsonSchema; @@ -19,7 +20,7 @@ struct MyMultipart { image: FieldData, } -async fn post_hello_world(TypedMultipart) -> StatusCode { +async fn post_hello_world(_: TypedMultipart) -> StatusCode { // do something return StatusCode::OK; }