PathItem class abstract
Describes the operations available on a single path.
This class represents a path definition in an OpenAPI document, which contains one or more HTTP operations.
- Available extensions
- Annotations
-
- @Freezed.new(copyWith: true, fromJson: true, toJson: false, equal: true)
Constructors
-
PathItem({Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? head, Operation? options, Operation? trace, @JsonKey.new(name: r'$ref') String? ref, String? summary, String? description, List<
Server> ? servers, List<Parameter> ? parameters, @JsonKey.new(includeIfNull: false, includeFromJson: false, includeToJson: false) Map<String, dynamic> ? extensions}) -
Creates a PathItem object.
constfactory
-
PathItem.fromJson(Map<
String, dynamic> json) -
Creates a PathItem from a JSON object.
factory
Properties
-
copyWith
→ $PathItemCopyWith<
PathItem> -
Create a copy of PathItem
with the given fields replaced by the non-null parameter values.
no setterinherited
- delete → Operation?
-
The definition for the
DELETEoperation.no setterinherited - description → String?
-
An optional string description,
intended to apply to all operations in this path.
CommonMark syntax MAY be used for rich text representation.
no setterinherited
-
extensions
→ Map<
String, dynamic> ? -
Vendor extensions (keys like
x-*).no setterinherited - get → Operation?
-
The definition for the
GEToperation.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- head → Operation?
-
The definition for the
HEADoperation.no setterinherited - options → Operation?
-
The definition for the
OPTIONSoperation.no setterinherited -
parameters
→ List<
Parameter> ? -
A list of parameters that are applicable for all the operations
described under this path.
These parameters can be overridden at the operation level,
but cannot be removed there.
The list MUST NOT include duplicated parameters.
A unique parameter is defined by a combination of a name
and location.
The list can use the Reference Object to link to parameters
that are defined at the OpenAPI Object's components/parameters.
no setterinherited
- patch → Operation?
-
The definition for the
PATCHoperation.no setterinherited - post → Operation?
-
The definition for the
POSToperation.no setterinherited - put → Operation?
-
The definition for the
PUToperation.no setterinherited - ref → String?
-
Allows for a referenced definition of this path item.
The value MUST be in the form of a URL,
and the referenced structure MUST be in the form of a Path Item Object.
In case a Path Item Object field appears both in the defined object
and the referenced object, the behavior is undefined.
See the rules for resolving Relative References.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
servers
→ List<
Server> ? -
An alternative servers array to service all operations in this path.
If a servers array is specified at the OpenAPI Object level,
it will be overridden by this value.
no setterinherited
- summary → String?
-
An optional string summary,
intended to apply to all operations in this path.
no setterinherited
- trace → Operation?
-
The definition for the
TRACEoperation.no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_PathItem value)) → TResult -
Available on PathItem, provided by the PathItemPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PathItem value)?) → TResult? -
Available on PathItem, provided by the PathItemPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_PathItem value)?, {required TResult orElse()}) → TResult -
Available on PathItem, provided by the PathItemPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? head, Operation? options, Operation? trace, String? ref, String? summary, String? description, List< Server> ? servers, List<Parameter> ? parameters, Map<String, dynamic> ? extensions)?, {required TResult orElse()}) → TResult -
Available on PathItem, provided by the PathItemPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this PathItem to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? head, Operation? options, Operation? trace, String? ref, String? summary, String? description, List< Server> ? servers, List<Parameter> ? parameters, Map<String, dynamic> ? extensions)) → TResult -
Available on PathItem, provided by the PathItemPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? head, Operation? options, Operation? trace, String? ref, String? summary, String? description, List< Server> ? servers, List<Parameter> ? parameters, Map<String, dynamic> ? extensions)?) → TResult? -
Available on PathItem, provided by the PathItemPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited