Components class abstract
An object to hold reusable objects for the specification.
This class represents the components
section of an OpenAPI document, where
reusable schemas, responses, parameters, and other objects are defined.
- Available extensions
- Annotations
-
- @Freezed(copyWith: true, fromJson: true, toJson: false, equal: true)
Constructors
-
Components.new({Map<
String, Schema> ? schemas, Map<String, Response> ? responses, Map<String, Parameter> ? parameters, Map<String, RequestBody> ? requestBodies, Map<String, SecurityScheme> ? securitySchemes, Map<String, Header> ? headers, Map<String, Link> ? links, Map<String, Callback> ? callbacks, Map<String, PathItem> ? pathItems, @JsonKey(includeIfNull: false, includeFromJson: false, includeToJson: false) Map<String, dynamic> ? extensions, Map<String, Example> ? examples}) -
Creates a Components object.
constfactory
-
Components.fromJson(Map<
String, dynamic> json) -
Creates a Components from a JSON object.
factory
Properties
-
callbacks
→ Map<
String, Callback> ? -
The callbacks available for reuse.
no setterinherited
-
copyWith
→ $ComponentsCopyWith<
Components> -
Create a copy of Components
with the given fields replaced by the non-null parameter values.
no setterinherited
-
examples
→ Map<
String, Example> ? -
An object to hold reusable Example Objects.
no setterinherited
-
extensions
→ Map<
String, dynamic> ? -
Vendor extensions (keys like
x-*
).no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, Header> ? -
The headers available for reuse.
no setterinherited
-
links
→ Map<
String, Link> ? -
An object to hold reusable Link Objects.
no setterinherited
-
parameters
→ Map<
String, Parameter> ? -
The parameters available for reuse.
no setterinherited
-
pathItems
→ Map<
String, PathItem> ? -
The path items available for reuse.
no setterinherited
-
requestBodies
→ Map<
String, RequestBody> ? -
The request bodies available for reuse.
no setterinherited
-
responses
→ Map<
String, Response> ? -
The responses available for reuse.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schemas
→ Map<
String, Schema> ? -
The schemas available for reuse.
no setterinherited
-
securitySchemes
→ Map<
String, SecurityScheme> ? -
The security schemes available for reuse.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Components value)) → TResult -
Available on Components, provided by the ComponentsPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Components value)?) → TResult? -
Available on Components, provided by the ComponentsPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_Components value)?, {required TResult orElse()}) → TResult -
Available on Components, provided by the ComponentsPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(Map< String, Schema> ? schemas, Map<String, Response> ? responses, Map<String, Parameter> ? parameters, Map<String, RequestBody> ? requestBodies, Map<String, SecurityScheme> ? securitySchemes, Map<String, Header> ? headers, Map<String, Link> ? links, Map<String, Callback> ? callbacks, Map<String, PathItem> ? pathItems, Map<String, dynamic> ? extensions, Map<String, Example> ? examples)?, {required TResult orElse()}) → TResult -
Available on Components, provided by the ComponentsPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this Components object to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(Map< String, Schema> ? schemas, Map<String, Response> ? responses, Map<String, Parameter> ? parameters, Map<String, RequestBody> ? requestBodies, Map<String, SecurityScheme> ? securitySchemes, Map<String, Header> ? headers, Map<String, Link> ? links, Map<String, Callback> ? callbacks, Map<String, PathItem> ? pathItems, Map<String, dynamic> ? extensions, Map<String, Example> ? examples)) → TResult -
Available on Components, provided by the ComponentsPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(Map< String, Schema> ? schemas, Map<String, Response> ? responses, Map<String, Parameter> ? parameters, Map<String, RequestBody> ? requestBodies, Map<String, SecurityScheme> ? securitySchemes, Map<String, Header> ? headers, Map<String, Link> ? links, Map<String, Callback> ? callbacks, Map<String, PathItem> ? pathItems, Map<String, dynamic> ? extensions, Map<String, Example> ? examples)?) → TResult? -
Available on Components, provided by the ComponentsPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited