PathItem class abstract

Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

Available extensions
Annotations
  • @Freezed.new(copyWith: true, fromJson: true, toJson: true, equal: true)

Constructors

PathItem({Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? options, Operation? head, Operation? trace, @JsonKey.new(name: r'$ref') String? ref, List<Parameter>? parameters, @JsonKey.new(includeIfNull: false, includeFromJson: false, includeToJson: false) Map<String, dynamic>? extensions})
Creates a PathItem object.
const
factory
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 DELETE operation.
no setterinherited
extensions Map<String, dynamic>?
Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details. Vendor extensions (keys like x-*).
no setterinherited
get Operation?
The definition for the GET operation.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
The definition for the HEAD operation.
no setterinherited
options Operation?
The definition for the OPTIONS operation.
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 Swagger Object's parameters. There can be one "body" parameter at most.
no setterinherited
patch Operation?
The definition for the PATCH operation.
no setterinherited
post Operation?
The definition for the POST operation.
no setterinherited
put Operation?
The definition for the PUT operation.
no setterinherited
ref String?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trace Operation?
The definition for the TRACE operation.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_PathItem value)) → TResult

Available on PathItem, provided by the PathItemPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_PathItem value)?) → TResult?

Available on PathItem, provided by the PathItemPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_PathItem value)?, {required TResult orElse()}) → TResult

Available on PathItem, provided by the PathItemPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? options, Operation? head, Operation? trace, String? ref, List<Parameter>? parameters, Map<String, dynamic>? extensions)?, {required TResult orElse()}) → TResult

Available on PathItem, provided by the PathItemPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this PathItem to a JSON map.
inherited
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? options, Operation? head, Operation? trace, String? ref, List<Parameter>? parameters, Map<String, dynamic>? extensions)) → TResult

Available on PathItem, provided by the PathItemPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(Operation? get, Operation? post, Operation? put, Operation? delete, Operation? patch, Operation? options, Operation? head, Operation? trace, String? ref, List<Parameter>? parameters, Map<String, dynamic>? extensions)?) → TResult?

Available on PathItem, provided by the PathItemPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited