Skip to content

Commit

Permalink
fix(aide-axum-typed-multipart): fixed doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Wicpar committed Mar 6, 2024
1 parent 2549fed commit 5ed75db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions crates/aide-axum-typed-multipart/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
5 changes: 3 additions & 2 deletions crates/aide-axum-typed-multipart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -19,7 +20,7 @@ struct MyMultipart {
image: FieldData<Bytes>,
}

async fn post_hello_world(TypedMultipart<MyMultipart>) -> StatusCode {
async fn post_hello_world(_: TypedMultipart<MyMultipart>) -> StatusCode {
// do something
return StatusCode::OK;
}
Expand Down

0 comments on commit 5ed75db

Please sign in to comment.