SimpleApiBuilder class
Simplified builder for creating API definitions with minimal code.
This builder provides a more concise syntax for creating API definitions compared to the verbose manual approach, while still being explicit about the API structure.
Constructors
- SimpleApiBuilder({required String title, required String baseUrl, String? description})
Properties
- baseUrl → String
-
final
- description → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
final
Methods
-
build(
) → ApiDefinition - Builds the final API definition.
-
delete(
String path, {String? name, String? description, List< String> ? queryParams, List<String> ? pathParams, List<String> ? headerParams, List<String> ? tags, String? responseType}) → SimpleApiBuilder - Adds a DELETE endpoint with the specified path and optional parameters.
-
get(
String path, {String? name, String? description, List< String> ? queryParams, List<String> ? pathParams, List<String> ? headerParams, List<String> ? tags, String? responseType}) → SimpleApiBuilder - Adds a GET endpoint with the specified path and optional parameters.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
String path, {String? name, String? description, List< String> ? queryParams, List<String> ? pathParams, List<String> ? headerParams, bool hasBody = true, List<String> ? tags, String? responseType}) → SimpleApiBuilder - Adds a PATCH endpoint with the specified path and optional parameters.
-
post(
String path, {String? name, String? description, List< String> ? queryParams, List<String> ? pathParams, List<String> ? headerParams, bool hasBody = true, List<String> ? tags, String? responseType}) → SimpleApiBuilder - Adds a POST endpoint with the specified path and optional parameters.
-
put(
String path, {String? name, String? description, List< String> ? queryParams, List<String> ? pathParams, List<String> ? headerParams, bool hasBody = true, List<String> ? tags, String? responseType}) → SimpleApiBuilder - Adds a PUT endpoint with the specified path and optional parameters.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited