Skip to main content

model_route_segment

Function model_route_segment 

pub fn model_route_segment(model_name: &str) -> String
Expand description

The canonical REST route segment (no leading /) for a model name — pluralize(&to_snake_case(model_name)). The server’s Axum route registration and every client generator’s route derivation must produce this exact string for a given model name; call this instead of composing to_snake_case/pluralize locally so the composition order can’t drift either.