pub struct ParamMeta {
pub name: &'static str,
pub source: &'static str,
pub type_hint: &'static str,
pub required: bool,
pub json_key: Option<&'static str>,
}Expand description
Metadata about a request parameter for OpenAPI generation.
Fields§
§name: &'static strField name (e.g., “id”, “body”).
source: &'static strParameter location: “path”, “query”, “header”, “form”, “body”, “claim”, or “” for an unmarked field that the route method resolves.
type_hint: &'static strType hint for OpenAPI schema (e.g., “string”, “integer”, “object”).
required: boolWhether the parameter must be present (Option<T> and Vec<T> are
not required; path parameters always are).
json_key: Option<&'static str>The JSON object key this parameter binds from, when it can bind from a
JSON body: an explicit #[frombody] field, a composite field, or an
unmarked field on a write method (the route method decides; source is
"" for those).
None for parameters bound from the path, query, header, form or
claims, and for a body field with no JSON key of its own — a
#[serde(flatten)] field spreads its inner properties into the body
object instead of owning one key.