Operation constructor
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
- @Default.new([]) List<
String> tags, - String? summary,
- String? description,
- String? operationId,
- @Default.new([]) List<
Parameter> parameters, - RequestBody? requestBody,
- @Default.new({}) Map<
String, Response> responses, - @Default.new([]) List<
SecurityRequirement> security, - List<
String> ? consumes, - List<
String> ? produces, - bool? deprecated,
Creates an Operation object.
Implementation
@JsonSerializable(includeIfNull: false, explicitToJson: true)
const factory Operation({
/// A list of tags for API documentation.
@Default([]) List<String> tags,
/// A brief summary of the operation.
String? summary,
/// A detailed description of the operation.
String? description,
/// A unique string used to identify the operation.
String? operationId,
/// A list of parameters for the operation.
@Default([]) List<Parameter> parameters,
/// The request body of the operation.
RequestBody? requestBody,
/// The possible responses for the operation.
@Default({}) Map<String, Response> responses,
/// A declaration of which security schemes are required for this operation.
@Default([]) List<SecurityRequirement> security,
/// A list of MIME types the operation can consume (OpenAPI 2.0).
List<String>? consumes,
/// A list of MIME types the operation can produce (OpenAPI 2.0).
List<String>? produces,
/// Specifies whether the operation is deprecated.
bool? deprecated,
}) = _Operation;