FunctionDef class

Represents a single API function definition.

Constructors

FunctionDef({required String name, required String api, String method = 'GET', dynamic request, dynamic response, bool pagination = false, bool? query})
Creates a FunctionDef instance.
FunctionDef.fromJson(Map<String, dynamic> json)
Creates a FunctionDef from a JSON map.
factory

Properties

api String
The API endpoint URL.
final
hashCode int
The hash code for this object.
no setterinherited
method String
The HTTP method (GET, POST, etc.).
final
name String
The name of the function.
final
pagination bool
Whether the function supports pagination.
final
query bool?
Whether the function uses query parameters instead of a request body.
final
request → dynamic
The request payload structure (Map or List).
final
response → dynamic
The response payload structure (Map or List).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isValid() bool
Validates the function definition.
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

Constants

validMethods → const List<String>
List of valid HTTP methods.