Procedural macros that power the RustAPI developer experience.
ℹ️ Note: These macros are re-exported by
rustapi-rs. You do not need to add this crate manually.
Replaces #[tokio::main]. Sets up the runtime, tracing subscriber, and other framework essentials.
Registers a function as a route handler.
#[rustapi_rs::get("/users/{id}")]#[rustapi_rs::post("/users")]#[rustapi_rs::put("/users/{id}")]#[rustapi_rs::delete("/users/{id}")]#[rustapi_rs::patch("/users/{id}")]#[rustapi_rs::head("/health")]#[rustapi_rs::options("/cors")]
Enrich your auto-generated documentation.
#[rustapi_rs::tag("Auth")]: Groups endpoints.#[rustapi_rs::summary("Logs in a user")]: Brief summary.#[rustapi_rs::description("Full markdown description...")]: Detailed docs.
Generates a JSON Schema for the struct, used by rustapi-openapi.
Uses RustAPI's native OpenAPI schema integration.
Generates validation logic.
Implements RustAPI v2 validation traits via rustapi-validate integration.