Operation constructor
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
- @Default.new([]) List<
String> tags, - String? summary,
- String? description,
- ExternalDocs? externalDocs,
- String? operationId,
- @Default.new([]) List<
Parameter> parameters, - RequestBody? requestBody,
- @Default.new({}) Map<
String, Response> responses, - @Default.new([]) List<
SecurityRequirement> security, - bool? deprecated,
- List<
Server> ? servers,
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 short summary of what the operation does.
String? summary,
/// A verbose explanation of the operation behavior.
/// CommonMark syntax MAY be used for rich text representation.
String? description,
/// Additional external documentation for this operation.
ExternalDocs? externalDocs,
/// 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,
/// Specifies whether the operation is deprecated.
bool? deprecated,
/// An alternative servers array to service this operation.
/// If a servers array is specified at the Path Item Object or
/// OpenAPI Object level, it will be overridden by this value.
List<Server>? servers,
}) = _Operation;