#[derive(Type)]
{
// Attributes available to this derive:
#[field]
}
Expand description
Derive macro for JSON body types.
Generates FromJson, Validate, and OpenApiSchema implementations.
ⓘ
#[derive(Type)]
pub struct CreateUser {
#[field(min = 1, max = 100)]
pub name: String,
#[field(format = "email")]
pub email: String,
pub age: Option<i32>,
}