Header constructor

  1. @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
const Header({
  1. String? description,
  2. String? type,
  3. String? format,
  4. Schema? schema,
  5. @JsonKey.new(name: r'$ref') String? ref,
})

Creates a Header object.

Implementation

@JsonSerializable(includeIfNull: false, explicitToJson: true)
const factory Header({
  /// A brief description of the header.
  String? description,

  /// The data type of the header value (for OpenAPI 2.0).
  String? type,

  /// The format of the header value (for OpenAPI 2.0).
  String? format,

  /// The schema for the header value.
  Schema? schema,

  /// The reference to the header value
  @JsonKey(name: r'$ref') String? ref,
}) = _Header;