pub struct Header {
pub type: TypeRef,
pub required: bool,
pub deprecated: bool,
pub documentation: Option<String>,
pub examples: Vec<(String, Example)>,
pub style: Option<ParameterStyle>,
pub explode: bool,
pub allow_reserved: bool,
pub allow_empty_value: bool,
pub location: Option<SpecLocation>,
}Expand description
OAS Header Object. Distinct from Parameter because headers
have a fixed serialization style (no style/explode), and
because required carries different semantics here:
“documented as always present in the response” rather than “the
request must include this”.
The header’s name lives on the surrounding tuple key
(Vec<(String, Header)>), not on this struct.
Fields§
§type: TypeRef§required: bool§deprecated: bool§documentation: Option<String>§examples: Vec<(String, Example)>§style: Option<ParameterStyle>OAS Header Object inherits the Parameter Object’s serialization
fields. The spec fixes style to simple for headers, but
captures the value verbatim so spec-strict consumers
(validators, doc generators) can see what was declared. Most
generators ignore this slot.
explode: boolOAS explode. Defaults to false per Header Object semantics.
allow_reserved: boolOAS allowReserved. Permits raw RFC 3986 reserved characters
in the rendered header value. Defaults to false.
allow_empty_value: boolOAS allowEmptyValue. Defaults to false.
location: Option<SpecLocation>