OpenApiOperation class
A single API operation (e.g. GET /users).
Constructors
-
OpenApiOperation({String? summary, String? description, String? operationId, List<
String> tags = const [], List<OpenApiParameter> parameters = const [], OpenApiRequestBody? requestBody, Map<String, OpenApiResponse> responses = const {}, List<Map< ? security, bool deprecated = false, Map<String, List< >String> >String, Object?> extensions = const {}}) -
Creates an operation with its optional request and response metadata.
const
-
OpenApiOperation.fromJson(Map<
String, Object?> json) -
Deserializes an operation from
json.factory
Properties
- deprecated → bool
-
Whether the operation is deprecated.
final
- description → String?
-
A detailed description of the operation.
final
-
extensions
→ Map<
String, Object?> -
Vendor extensions emitted alongside this operation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- operationId → String?
-
The stable identifier used by generated clients.
final
-
parameters
→ List<
OpenApiParameter> -
Parameters accepted by this operation.
final
- requestBody → OpenApiRequestBody?
-
The optional request body.
final
-
responses
→ Map<
String, OpenApiResponse> -
Responses keyed by HTTP status code.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
security
→ List<
Map< ?String, List< >String> > -
Per-operation security requirements.
final
- summary → String?
-
A short summary of the operation.
final
-
Tags grouping this operation.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Serializes the operation to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited