utoipa
utoipa copied to clipboard
Missing some fields in Header struct
The Header struct misses the fields inherited from Parameter struct. For example, "required", "deprecated", "style", "explode", "examples", "example", "content" and "extensions".
Please verify the resources you supplied. https://spec.openapis.org/oas/latest.html#header-object It says "The Header Object follows the structure of the Parameter Object", not only the two fields of the example.
/// Implements [OpenAPI Header Object][header] for response headers.
///
/// [header]: https://spec.openapis.org/oas/latest.html#header-object
#[non_exhaustive]
#[derive(Serialize, Deserialize, Clone, PartialEq)]
#[cfg_attr(feature = "debug", derive(Debug))]
pub struct Header {
/// Schema of header type.
pub schema: RefOr<Schema>,
/// Additional description of the header value.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}