flutter_easy_swagger_generator 1.0.1
flutter_easy_swagger_generator: ^1.0.1 copied to clipboard
A Flutter package for generating Dart models and API clients from Swagger/OpenAPI specifications.
1.0.1 #
- Update lints
1.0.0 #
Major Changes #
-
CLI Generator Added
- Added a standalone CLI entry point (
bin/flutter_easy_swagger_generator.dart) to run the generator directly:dart run flutter_easy_swagger_generator <path_to_swagger.json> [--watch] - Fully independent of
build_runner, but works similarly with live regeneration.
- Added a standalone CLI entry point (
-
Improved Response Model Generation
- Models for API responses are now generated with correct and strongly typed
fromJsonandtoJsonmethods for requests. - Automatically resolves
$refobjects and nested types into separate model classes. - Added null safety and list handling (
List<T>parsing).
- Models for API responses are now generated with correct and strongly typed
-
Enhanced Request Handling
- Now supports all HTTP methods:
GET,POST,PUT,DELETE, and others.
- Automatically detects and generates correct API call methods.
- Now supports all HTTP methods:
-
Multipart Form Request Support
- Automatically detects endpoints requiring multipart/form-data.
- Generates correct Dio multipart request handling with
FormDataandMultipartFile.
-
Comprehensive Parameter Support
- Handles all request parameter types:
- Header parameters
- Query parameters
- Body parameters
- Automatically maps them to generated entity classes and serializes them in
toJson().
- Handles all request parameter types:
-
Documentation Improvements
- Added clear inline documentation for:
- CLI usage
- Swagger generator functions
- Generated code examples
- Updated README with new usage instructions and examples for CLI mode.
- Added clear inline documentation for:
0.0.3 #
- Fixed LICENSE file error
0.0.2 #
- Added new parameters to
swaggerGenerator:categoryfor filtering generated code by API path categoryprefixesToRemovefor removing specific prefixes from generated class and file names
- Added
swaggerSingleCategoryGeneratorfunction to generate code for a single API category - Documented
swaggerSingleCategoryGeneratorin code and README - Added usage example for
swaggerSingleCategoryGeneratorin README and example - Updated documentation and usage examples in README.md
- Improved code generation flexibility and customization
0.0.1 #
- Initial release of flutter_easy_swagger_generator
- Features:
- Automatic generation of Dart models from Swagger/OpenAPI specifications
- Support for nested references and complex data structures
- Built-in support for BLoC pattern integration
- Dependency injection support with get_it
- Cross-platform compatibility (iOS, Android, Web)
- Comprehensive documentation and examples
- Support for various data types and formats
- Automatic null safety support
- Customizable model generation with annotations
- Support for enums and complex nested objects
- Web platform support with universal_html package
- Comprehensive error handling and validation
- Support for various HTTP methods and API endpoints
- Automatic generation of API client code
- Support for authentication and headers
- Built-in support for common HTTP clients (dio, http)
- Type-safe API calls with generated models
- Support for file uploads and downloads
- Comprehensive logging and debugging support