NewYour coding agent can read the release notes before it upgrades.Set up the MCP server โ
pub.dev
pub.dev
Production-ready REST API framework with comprehensive JWT authentication system, custom validators, annotation-based routing, token blacklisting, etc.
Latest stable
0.1.3
Last release 1 years ago
31 Aug 2025
Too new to tell
only 2 release windows
Nearly every release is documented
notes for 8 of 8 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
8 releases ยท first in 2025
Drag across the ruler to compare, or tap a release to open it.
NEW: includePaths parameter in ApiServer.start() for custom annotation scanning
includePaths parameter in ApiServer.start() for custom annotation scanningincludePaths parameter in ControllerRegistry.discoverControllers()ApiServer.start() now accepts optional includePaths parameterControllerRegistry.discoverControllers() supports custom paths// Custom path scanning
await server.start(
host: 'localhost',
port: 8080,
includePaths: ['lib'], // Only scan lib/ directory
);
// Multiple specific directories
await server.start(
host: 'localhost',
port: 8080,
includePaths: ['lib/controller', 'src/api'], // Specific paths only
);
// Default behavior (unchanged)
await server.start(
host: 'localhost',
port: 8080,
// No includePaths = scans lib/, bin/, example/
);
ControllerRegistry passes includePaths to AnnotationAPI.detectIn()Your coding agent can read these notes before it upgrades. Set up the MCP server โ
MAINTAINED: 100% backward compatibility - zero breaking changes
includePaths parameter in all AnnotationAPI methods['lib', 'bin', 'example'] with custom override supportclearCache() method for development/testing scenarios// Use custom paths for annotation detection
final result = await AnnotationAPI.detectIn('/project/path',
includePaths: ['src', 'controllers'] // Custom directories
);
// Default behavior (lib/, bin/, example/)
final result = await AnnotationAPI.detectIn('/project/path');
// Clear cache when needed (development)
StaticRouterBuilder.clearCache();
AnnotationAPI.detectIn() with optional includePathsStaticRouterBuilder.buildFromController() with includePaths support- Clean libs for yaml.
Full Changelog: https://github.com/JhonaCodes/api_kit/commits/v0.1.0
Full Changelog: https://github.com/JhonaCodes/api_kit/commits/v0.1.0
@RequestHeader.all() - Capture ALL headers automatically@QueryParam.all() - Capture ALL query parameters automatically@RequestContext.all() - Access entire request contextRequest request parameter in most cases@RequestMethod() - Direct access to HTTP method (GET, POST, etc.)@RequestPath() - Direct access to request path@RequestHost() - Direct access to request host@RequestPort() - Direct access to request port@RequestScheme() - Direct access to request scheme (http/https)@RequestUrl() - Direct access to complete URL as UriApiKit.ok<T>(T data) - Standardized success responses using result_controllerApiKit.err(String message) - Standardized error responses using result_controllerApiResponseBuilder - HTTP response conversion utilitydart compile exe now works)@RestController(basePath: '/path') - Standardized controller annotation@JWTEndpoint([validators]) - Endpoint-specific JWT validation@JWTController([validators]) - Controller-level JWT protection@JWTPublic() - Mark endpoints as public (no JWT required)safeExecute and safeExecuteAsync functions (completely eliminated)ResponseBuilder class (replaced by ApiResponseBuilder)Request request usage throughout examples@RestController instead of legacy patterns/docs directory/example directory use new patterns@Controller('/api/users')
class UserController extends BaseController {
@GET('/profile')
Future<Response> getProfile(
Request request, // โ Required for manual extraction
@RequestBody() Map<String, dynamic> data,
) async {
// Manual extractions
final headers = request.headers;
final queryParams = request.url.queryParameters;
final jwt = request.context['jwt_payload'];
return safeExecute(() async {
// Custom result handling
return {'user': data};
});
}
}
@RestController(basePath: '/api/users')
class UserController extends BaseController {
@GET('/profile')
@JWTEndpoint([MyUserValidator()])
Future<Response> getProfile(
@RequestBody() Map<String, dynamic> data,
@RequestHeader.all() Map<String, String> allHeaders, // โ ALL headers
@QueryParam.all() Map<String, String> allQueryParams, // โ ALL params
@RequestContext('jwt_payload') Map<String, dynamic> jwt, // โ Direct JWT
@RequestMethod() String method, // โ Direct method
@RequestPath() String path, // โ Direct path
// NO Request request needed! ๐
) async {
// Direct access - no manual extractions
final userId = jwt['user_id'];
return ApiKit.ok({
'user': data,
'method': method,
'path': path,
}).toHttpResponse();
}
}
dart compile exedart run build_runner build for AOT benefitsdart compile exe for optimized binaries/docs directoryThis version represents a major step forward in API development ergonomics while maintaining full backward compatibility.
- Fix GitHub links
Improve documentation, warnings, etc.
JWT Annotations: @JWTPublic, @JWTController, @JWTEndpoint for fine-grained access control
@JWTPublic, @JWTController, @JWTEndpoint for fine-grained access controlJWTValidatorBase class for implementing custom authorization logicrequireAll parameter for flexible validator combinationsrequest.context for endpoint consumptionuser_id, user_email, user_role)configureJWTAuth(), disableJWTAuth() methods for dynamic JWT setupblacklistToken(), clearTokenBlacklist(), blacklistedTokensCount for token lifecyclejwt_validation_system_test.dart - Core JWT system functionalityjwt_production_ready_test.dart - Critical production scenariosjwt_validated_system_test.dart - Functional validation testsjwt_comprehensive_test.dart - Exhaustive edge case coveragejwt_system_simple_test.dart - Basic unit testsjwt_annotations_test.dart - Annotation integration testsdoc/15-jwt-validation-system.md@JWTController (Controller Level)
โ
@JWTEndpoint (Method Level - Overrides Controller)
โ
@JWTPublic (Public - Bypasses All Validation)
HTTP Request โ JWT Extraction โ Custom Validators โ Business Logic โ Response
@RequireAuth annotations with new JWT systemconst for compile-time optimizationInitial release - Complete framework for secure REST APIs with annotation support
One column per month.