api_gen 0.1.0
api_gen: ^0.1.0 copied to clipboard
A simple Dart code generator that creates model classes (with fromJson/toJson) from a JSON schema, saving time on boilerplate in Flutter/Dart projects.
Changelog #
0.1.0 #
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
0.0.5 #
- Added
generatecommand to the package's CLI - Improved README file
0.0.4+1 #
- Updated dart doc comments on all files
0.0.4 #
- 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
0.0.3 #
- v3 of api_gen
- Support for nested models
- CLI global executable support