Skip to main content

operation

Attribute Macro operation 

Source
#[operation]
Expand description

Generic operation attribute for cases where the HTTP method must be specified explicitly (multi-method routes, non-standard verbs).

#[operation(get, "/path", ...)] is equivalent to #[get("/path", ...)]. Prefer the method-specific shortcuts for clarity.