OpenApiFromParam

Trait OpenApiFromParam 

Source
pub trait OpenApiFromParam<'r>: FromParam<'r> {
    // Required method
    fn path_parameter(
        gen: &mut OpenApiGenerator,
        name: String,
    ) -> Result<Parameter>;
}
Expand description

This trait is used to document a dynamic part of a path that implements FromParam. For example <user_id> in route path.

Required Methods§

Source

fn path_parameter(gen: &mut OpenApiGenerator, name: String) -> Result<Parameter>

Return a Parameter containing the information required to document the FromParam path parameter.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'r, T> OpenApiFromParam<'r> for T
where T: FromParam<'r> + JsonSchema,