TParameter class

Represents a parameter in an API endpoint, such as query, path, header, or cookie parameters.

Mirrors the OpenAPI Parameter Object for fields commonly used by this generator.

Constructors

TParameter({required String name, required String inn, required TProperty? schema, required bool required, required TPropertyType? type, required bool allowEmptyValue, required dynamic example, required String? format})
Constructor for TParameter.
TParameter.fromJson(Map<String, dynamic> json)
Creates a TParameter instance from a decoded OpenAPI Parameter JSON.
factory

Properties

allowEmptyValue bool
Whether empty values are allowed for this parameter.
final
example → dynamic
Example value for this parameter, used for documentation and testing.
final
format String?
Optional format hint (e.g., uuid, date-time, custom strings). Consumers may use this to customize (de)serialization or display.
final
hashCode int
The hash code for this object.
no setterinherited
inn String
The location of the parameter. Must be one of "query", "header", or "path".
final
name String
The name of the parameter.
final
required bool
Optional flag indicating if the parameter is required.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema TProperty?
Optional schema describing the type of this parameter.
final
type TPropertyType?
Optional type of the parameter.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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