Skip to main content

tag_operations_by_module

Function tag_operations_by_module 

Source
fn tag_operations_by_module(api: &mut OpenApi)
Expand description

Declare a path parameter for every {name} template segment of every operation.

aide only derives path parameters from Path<T> extractors whose T is a named-field struct; the v1 handlers all use primitives and tuples (Path<u64>, Path<(u64, String)>), so nothing is derived and Swagger’s try-it-out cannot fill the URL templates. The template itself names every parameter, so declare them from it.

Parameter types come from path_parameter_schema; the handlers parse the raw segment either way, so a wrong entry there affects only documentation, not behavior. Tag each operation with its module (first path segment after /v1/) so Swagger groups them.