Header constructor
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Creates a new instance of the Header class.
Implementation
@JsonSerializable(includeIfNull: false, explicitToJson: true)
const factory Header({
/// A brief description of the header.
String? description,
/// Determines whether this header is mandatory. Default is false.
bool? required,
/// Specifies that the header is deprecated and
/// SHOULD be transitioned out of usage. Default is false.
bool? deprecated,
/// Describes how the header value will be serialized.
/// Only "simple" is allowed for headers.
String? style,
/// When true, header values of type array or
/// object generate a single header whose value is a comma-separated list.
bool? explode,
/// The schema defining the type used for the header.
Schema? schema,
/// Example of the header's potential value.
dynamic example,
/// Examples of the header's potential value.
Map<String, Example>? examples,
/// A map containing the representations for the header.
/// Must only contain one entry.
Map<String, MediaType>? content,
/// Reference to a header object.
@JsonKey(name: r'$ref') String? ref,
}) = _Header;