RequestBody constructor

  1. @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
const RequestBody({
  1. String? description,
  2. @JsonKey.new(name: 'required') bool? $required,
  3. @Default.new({}) Map<String, MediaType> content,
})

Creates a RequestBody object.

Implementation

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

  /// Determines if the request body is required.
  @JsonKey(name: 'required') bool? $required,

  /// The content of the request body, mapped by media type.
  @Default({}) Map<String, MediaType> content,
}) = _RequestBody;