Response constructor

const Response({
  1. @Default('') String description,
  2. Map<String, Header>? headers,
  3. Map<String, MediaType>? content,
  4. Map<String, Link>? links,
  5. @JsonKey(name: '\$ref') @_ResponseRefConverter() String? ref,
})

Implementation

const factory Response({
  /// A description of the response
  @Default('') String description,

  /// Maps a header name to its definition. RFC7230 states header names are case insensitive.
  Map<String, Header>? headers,

  /// A map containing descriptions of potential response payloads.
  Map<String, MediaType>? content,

  /// A map containing descriptions of potential response payloads.
  Map<String, Link>? links,

  /// Reference to a response defined in [Components.responses]
  @JsonKey(name: '\$ref') @_ResponseRefConverter() String? ref,
}) = _Response;