Encoding constructor

  1. @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
const Encoding({
  1. String? contentType,
  2. @Default.new({}) Map<String, Header> headers,
  3. String? style,
  4. bool? explode,
  5. bool? allowReserved,
  6. @JsonKey.new(name: r'$ref') String? ref,
})

Creates an Encoding object.

Implementation

@JsonSerializable(includeIfNull: false, explicitToJson: true)
const factory Encoding({
  /// The Content-Type for encoding a specific property.
  String? contentType,

  /// A map allowing additional information to be provided as headers.
  /// This field is ignored if the request body media type is not a multipart.
  @Default({}) Map<String, Header> headers,

  /// Describes how a specific property value will be serialized.
  String? style,

  /// When this is true, property values of type array or object
  /// generate separate parameters for each value.
  bool? explode,

  /// When this is true, parameter values are serialized using reserved
  /// expansion as defined by RFC6570.
  bool? allowReserved,

  /// The reference to the Encoding Object.
  @JsonKey(name: r'$ref') String? ref,
}) = _Encoding;