luthor_generator 0.14.0
luthor_generator: ^0.14.0 copied to clipboard
Generate luthor schemas
luthor_generator #
luthor_generator is a package allowing you to generate luthor schemas with
code generation. It is a companion to
the luthor package, and is built to work
with freezed.
Features #
- Schema Generation - Automatically generate validation schemas from annotated classes
- Type-safe SchemaKeys - Generated constants for defining schemas with compile-time safety
- Type-safe ErrorKeys - Generated constants for accessing validation errors with dot-notation support
- Cross-field Validation - Support for
@WithSchemaCustomValidatorto validate fields against other fields
Generated Code #
For each annotated class, luthor_generator creates:
$ClassNameSchema- The validation schemaClassNameSchemaKeys- Type-safe keys for schema field accessClassNameErrorKeys- Type-safe keys for error handling with nested field support$ClassNameValidate()- Validation function with optionalfromJsondeserialization
See the documentation for more information.