#axum #web #multipart-form #multipart

aide-axum-typed-multipart

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

1 unstable release

0.13.0 Mar 6, 2024

#29 in #multipart-form

Download history 124/week @ 2024-08-29 41/week @ 2024-09-05 93/week @ 2024-09-12 77/week @ 2024-09-19 20/week @ 2024-09-26 26/week @ 2024-10-03 27/week @ 2024-10-10 12/week @ 2024-10-17 5/week @ 2024-10-24 20/week @ 2024-10-31 30/week @ 2024-11-07 57/week @ 2024-11-14 99/week @ 2024-11-21 68/week @ 2024-11-28 50/week @ 2024-12-05 40/week @ 2024-12-12

274 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

~11–19MB
~356K SLoC