api_gen
A simple Dart code generator that creates model classes (with fromJson/toJson) from a JSON schema, saving time on boilerplate in Flutter/Dart projects.
0.1.0
56 downloads/mo
#3711 most downloaded on pub.dev
mrrda1969/api_gen
What this package is like to depend on
Last release 10 months ago
11 Oct 2025
Ships on a steady schedule
a new release about every 3 weeks
Most releases are documented
notes for 5 of 7 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
7 releases · first in 2025
4 releases in the last 12 months
see the full history below
Release timeline
7 releases · Aug 2025 to Oct 2025Releases
latest 7-
0.1.011 Oct 2025Release notes
Open source →Major Release - Complete CLI Implementation
- Complete CLI Interface - Added
generate,validate, andwatchcommands - Schema Validation - Built-in validation for JSON Schema structures with detailed error reporting
- File Watching - Real-time schema monitoring with automatic regeneration and configurable polling intervals
- Enhanced Error Handling - Comprehensive exception types with specific error messages
- Comprehensive Testing - Full test suite covering CLI, schema validation, model generation, and integration
- Bug Fixes - Fixed import statement generation bug in legacy mode
- Improved Documentation - Updated README with complete CLI usage examples and testing information
CLI Commands Added:
api_gen generate- Generate Dart models from JSON schemasapi_gen validate- Validate JSON schema structure and formatapi_gen watch- Monitor schema files and regenerate models on changesapi_gen help- Display help information for commands
Technical Improvements:
- Restructured codebase to match modern Dart package conventions
- Enhanced schema parsing with proper
$refhandling - Improved nested model support with correct import generation
- Added comprehensive error handling for all file operations
- Implemented result pattern for better error management
- Complete CLI Interface - Added
-
0.0.530 Sep 2025 -
0.0.409 Sep 2025Release notes
Open source →- Added
ApiGenClientfor high-level programmatic usage - Comprehensive exception handling with specific exception types
- Enhanced input validation and error recovery
- Multiple usage examples and comprehensive documentation
- Support for both legacy and standard JSON Schema formats
- Improved CLI error messages and logging
- Better error handling for file operations and JSON parsing
- Auto-detection of schema format (legacy vs standard JSON Schema)
- Improved nested model support with proper imports
- Added
-
0.0.4+113 Sep 2025 -
0.0.325 Aug 2025 -
0.0.220 Aug 2025Nothing published for this version
-
0.0.119 Aug 2025Nothing published for this version