Trait rocket_okapi::request::OpenApiFromFormField
source · [−]pub trait OpenApiFromFormField<'r>: FromFormField<'r> {
fn form_parameter(
gen: &mut OpenApiGenerator,
name: String,
required: bool
) -> Result<Parameter>;
}
Expand description
This trait is used to document a query guard segment that implements
FromFormField
.
For example ?<param>
in the route’s query part.
Required Methods
fn form_parameter(
gen: &mut OpenApiGenerator,
name: String,
required: bool
) -> Result<Parameter>
fn form_parameter(
gen: &mut OpenApiGenerator,
name: String,
required: bool
) -> Result<Parameter>
Return a Parameter
containing the information required to document the
FromFormField
route’s query part.