pub struct ParameterInfo {
pub name: String,
pub location: String,
pub required: bool,
pub schema_ref: Option<String>,
pub rust_type: String,
pub description: Option<String>,
pub enum_values: Option<Vec<String>>,
pub rust_ident: Option<String>,
pub query_serialization: Option<QuerySerialization>,
}Expand description
Information about an operation parameter
Fields§
§name: StringParameter name
location: StringParameter location (path, query, header, cookie)
required: boolWhether the parameter is required
schema_ref: Option<String>Schema reference for the parameter type
rust_type: StringRust type for this parameter
description: Option<String>Description from OpenAPI spec
enum_values: Option<Vec<String>>String enum values when the parameter’s inline schema is a string with
enum or const. When set, rust_type is the synthetic enum type
name (e.g. GetItemTheConstant) and the client generator emits an
inline enum so the parameter is constrained to the declared values.
See issue #10 follow-up.
rust_ident: Option<String>Disambiguated Rust ident assigned by the analyzer at the operation
scope. When two parameters in the same operation sanitize to the same
snake_case name (e.g. exclude_ids + exclude-ids in vercel,
StartTime + StartTime> in twilio), the analyzer suffixes
later occurrences with _2, _3, … so the codegen function
signature and body don’t reuse the same binding.
Empty/none = use sanitize from name.
query_serialization: Option<QuerySerialization>Wire serialization for object/array query parameters, decided from
the parameter’s style/explode and schema shape (T14, GH #27).
None = plain single name=value pair (scalars, string enums, and
the opaque-string fallback for styles that aren’t generated yet).
For the object modes, schema_ref holds the struct type
generated/resolved for the object schema.
Trait Implementations§
Source§impl Clone for ParameterInfo
impl Clone for ParameterInfo
Source§fn clone(&self) -> ParameterInfo
fn clone(&self) -> ParameterInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more