purwa-cli 0.2.0

Empu — Purwa CLI (Artisan-equivalent)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Generated by `empu make:request {{ prefix }}`.
//!
//! Use with [`purwa::ValidatedJson`] or [`purwa::ValidatedForm`] in handlers.
//! Ensure your crate depends on `serde`, `validator`, and `purwa`.

use serde::Deserialize;
use validator::Validate;

#[derive(Debug, Deserialize, Validate)]
pub struct {{ struct_name }} {
    /// Example field — replace with your DTO.
    #[validate(length(min = 1, message = "is required"))]
    pub title: String,
}