Parameter constructor
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
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;