Parameter constructor

  1. @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
const Parameter({
  1. @JsonKey.new(name: r'$ref') String? ref,
  2. String? name,
  3. @JsonKey.new(name: 'in') ParameterLocation? location,
  4. String? description,
  5. bool? required,
  6. bool? deprecated,
  7. Schema? schema,
  8. String? type,
  9. String? format,
  10. String? collectionFormat,
  11. Schema? items,
  12. num? maximum,
  13. num? minimum,
  14. bool? explode,
})

Creates a Parameter object.

Implementation

@JsonSerializable(includeIfNull: false, explicitToJson: true)
const factory Parameter({
  /// A reference to a Parameter Object, typically in the `components`
  /// section. If this field is non-null, all other fields must be null.
  @JsonKey(name: r'$ref') String? ref,

  /// The name of the parameter.
  String? name,

  /// The location of the parameter, typically `query`, `header`, `path`,
  /// or `cookie`.
  @JsonKey(name: 'in') ParameterLocation? location,

  /// A brief description of the parameter.
  String? description,

  /// Specifies whether the parameter is required.
  bool? required,

  /// Specifies whether the parameter is deprecated.
  bool? deprecated,

  /// Specifies the schema of the parameter's value (OpenAPI 3.0).
  Schema? schema,

  /// The data type of the parameter (OpenAPI 2.0).
  String? type,

  /// The format of the parameter's value (OpenAPI 2.0).
  String? format,

  /// The collection format for array parameters (OpenAPI 2.0).
  String? collectionFormat,

  /// For array types, describes the type of items in the array (OpenAPI 2.0).
  Schema? items,

  /// The maximum allowed value for a numeric parameter.
  num? maximum,

  /// The minimum allowed value for a numeric parameter.
  num? minimum,

  /// Specifies whether array or object parameters should be exploded.
  bool? explode,
}) = _Parameter;