api_gen 0.1.0 copy "api_gen: ^0.1.0" to clipboard
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, and watch commands
  • 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 schemas
  • api_gen validate - Validate JSON schema structure and format
  • api_gen watch - Monitor schema files and regenerate models on changes
  • api_gen help - Display help information for commands

Technical Improvements: #

  • Restructured codebase to match modern Dart package conventions
  • Enhanced schema parsing with proper $ref handling
  • 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 generate command to the package's CLI
  • Improved README file

0.0.4+1 #

  • Updated dart doc comments on all files

0.0.4 #

  • Added ApiGenClient for 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
1
likes
150
points
270
downloads

Publisher

verified publishereverything-open.online

Weekly Downloads

A simple Dart code generator that creates model classes (with fromJson/toJson) from a JSON schema, saving time on boilerplate in Flutter/Dart projects.

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

args

More

Packages that depend on api_gen