utoipa icon indicating copy to clipboard operation
utoipa copied to clipboard

Missing some fields in Header struct

Open gy0801151351 opened this issue 1 year ago • 0 comments

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>,
}

gy0801151351 avatar Dec 11 '23 06:12 gy0801151351