#multipart #axum #web #multipart-form

aide-axum-typed-multipart

Type safe multipart/form-data handling for axum and aide

1 unstable release

0.13.0 Mar 6, 2024

#20 in #multipart-form

Download history 31/week @ 2024-06-15 74/week @ 2024-06-22 92/week @ 2024-06-29 63/week @ 2024-07-06 65/week @ 2024-07-13 117/week @ 2024-07-20 186/week @ 2024-07-27 26/week @ 2024-08-03 15/week @ 2024-08-10 268/week @ 2024-08-17 19/week @ 2024-08-24 151/week @ 2024-08-31 43/week @ 2024-09-07 74/week @ 2024-09-14 73/week @ 2024-09-21 24/week @ 2024-09-28

232 downloads per month

MIT/Apache

3.5MB
7K SLoC

Rust 5K SLoC // 0.0% comments JavaScript 1.5K SLoC // 0.0% comments

aide-axum-typed-multipart

Wrapper around axum_typed_multipart to generate documentation for multipart requests.

Example

use aide_axum_typed_multipart::{FieldData, TypedMultipart};
use axum::{body::Bytes, http::StatusCode};
use axum_typed_multipart::TryFromMultipart;
use schemars::JsonSchema;

#[derive(TryFromMultipart, JsonSchema)]
struct MyMultipart {
    title: String,
    description: String,
    #[form_data(limit = "unlimited")]
    image: FieldData<Bytes>,
}

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

Dependencies

~13–24MB
~418K SLoC