Skip to content

v0.1.25

Choose a tag to compare

@decebal decebal released this 19 Mar 17:12
· 7 commits to main since this release
24220a0

Added

  • Router-level KeyTransform (#57) — New KeyTransform enum and Router::with_key_transform() builder method that automatically converts JSON arg keys before handler deserialization. Supports KeyTransform::CamelToSnake to convert camelCase keys (Tauri 2 frontend convention) to snake_case (Rust struct fields), eliminating the need for #[serde(rename_all = "camelCase")] on every input struct.

Usage

use allframe_core::router::{Router, KeyTransform};

let router = Router::new()
    .with_key_transform(KeyTransform::CamelToSnake);
// {"workflowName": "deploy"} → {"workflow_name": "deploy"} automatically

See the full CHANGELOG for details.