zorphy_annotation 2.3.1
zorphy_annotation: ^2.3.1 copied to clipboard
Annotations for zorphy code generation package that provides clean class definitions with copyWith, JSON serialization, toString, equality, and inheritance support
2.3.1 - 2026-08-27 #
Change #
- Version synced with
zorphy2.3.1 (no annotation API changes in this release).
2.3.0 - 2026-08-23 #
Feat #
- Added
equalityExcludesto@Zorphy,@Zorphy2, andZorphyXfor excluding selected fields from generated equality, lean JSON, and comparison surfaces. - Added agent annotations:
@AgentTool,@AgentRisk,@AgentInternal,@AgentExclude, and@AgentToolParam. - Added
@ZorphyNamedConstructorsupport for custom constructor bodies.
2.2.0 - 2026-08-21 #
Change #
- Version synced with
zorphy2.2.0 (no annotation API changes in this release).
2.1.1 - 2026-08-21 #
Change #
- Version synced with
zorphy2.1.1 (no annotation API changes in this release).
2.1.0 - 2026-08-03 #
2.0.0 - 2026-08-16 #
Feat #
@Zorphy(autoId: true)— auto-generated identity: the generated concrete constructor'sidparameter is optional and defaults to a freshUuid().v4()at construction time (zuraffa#307 — entities likeChatMessage/TelemetryEventno longer need callers to supply ids). The annotated class declaresString get id;and the library importspackage:uuid/uuid.dart.ZorphyKind(entity/valueObject) on@Zorphy/@Zorphy2plus the@ZValueObjectconst alias — marks a class as an immutable composition type with no identity. Codegen (equality, copyWith, JSON) is unchanged; the kind is consumed by the zfamakepipeline to skip root plugins.ZorphyXinterface extended withkindandautoIdgetters.
[2.1.0] - 2026-08-03 #
Feat #
- Added
MergeModeenum (smart/force) for future per-class merge control — re-exported fromzorphy_annotation.dartfor consumer access
Change #
- SDK constraint aligned to
>=3.8.0 <4.0.0(matcheszorphypackage) - Version synced with
zorphy2.1.0
[2.0.0] - 2026-07-30 #
Break #
- All feature flags on
@Zorphy/@Zorphy2are nowbool?(defaultnull= inherit from preset). Source-compatible for named-argument use; the resolved semantics are unchanged for defaults ZorphyX.generateFiltergetter type changedbool→bool?
Feat #
- New
ZorphyPresetenum (lean/standard/full) andpresetparameter on both annotations (defaultstandard, reproducing 1.9.0 output) - New flags:
generateCopyWith,generatePropertyHelpers,generateEqualsToString,generateChangeTo @zorphy2/Zorphy2deprecated — the generator is single-pass since 2.0; the alias behaves identically and will be removed in a later major
1.9.0 - 2026-07-21 #
Break #
- Removed
ZorphyJsonHelperandZorphyJsonCastErrorclasses — no longer used; JSON deserialization is now fully handled byjson_serializable's nativechecked: truegeneration - Removed
export 'src/json_helper.dart'andexport 'src/json_cast_error.dart'fromzorphy.dart
1.8.1 - 2026-07-20 #
Feature #
- Added
ZorphyJsonCastErrorandZorphyJsonHelperclasses for shared safe JSON casting with field-level error messages
1.6.9 - 2026-04-27 #
Change #
- Revert property helper generation to ownFields and fix automated publishing flow
1.6.8 - 2026-04-27 #
Change #
- Streamline release process and fix PropertyHelpers extension generation for inherited fields
1.6.6 - 2026-04-05 #
Feature #
- Added
PatchBaseclass to centralize JSON serialization for leaner patch generation.
1.6.1 - 2026-02-15 #
Change #
- Refactored CLI code to be more robust and consumable
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.5.7 - 2026-02-14 #
Fix #
- Modified skip logic in
getProperties()to not skip fields that exist in both parentFields and ownFields (overridden fields) - Prevents duplicate
@overrideannotation when source already has it - Constructor generation
isParentFieldcheck now excludes fields in ownFields so overridden fields usethis.fieldsyntax - Added
_getCovariantFields()helper to detect fields where class type differs from interface type getInterfaceCopyWithMethods()now uses class field types (not interface types) for parameters and adds covariant where neededgetInterfaceCopyWithFnMethods()now uses class field types for parameters
1.5.6 - 2026-02-14 #
Chore #
- Updated docs and created docusaurus website
- Create public constructors by default and only create private when hidden
1.5.4 - 2026-02-13 #
Change #
- Allow hybrid serialization with json_serializable for generic field types
1.5.3 - 2026-02-13 #
Fix #
- Fixed JsonKey and other annotations not being caught due to Analyzer 10 changes
1.5.2 - 2026-02-12 #
Fix #
- Updated copyWith generation to use a sentinel parameter pattern, preserving non-nullable fields while allowing explicit nulls for nullable fields
1.1.0 - 2026-02-05 #
Change #
- Fixed edge case where a class extends a sealed class and implements another class causing parameters not passed in super constructor
1.0.0 - 2026-02-04 #
Added #
- Initial release of zorphy_annotation package
- Core
@Zorphy()annotation with full configuration support generateJsonoption for JSON serializationgenerateCompareTooption for diff generationgenerateCopyWithFnoption for function-based copyWithexplicitSubTypesoption for sealed class hierarchies- Support for generic type parameters
- Support for nested object patching
- Support for self-referencing types
- Support for multiple inheritance via interfaces
- Support for enum fields
- Support for constant constructors
- Full TypeScript-style type safety
Features #
- Immutable data class generation
- Automatic constructor generation
- Smart copyWith methods
- Advanced patching system with fluent API
- JSON serialization with lean JSON option
- Sealed classes with polymorphic serialization
- Multiple inheritance support
- Generic class support
- Enum integration
- Self-referencing type support
- Comparison and diff generation
- Equality and hashCode generation
- ToString generation
- Type-safe field enums
Documentation #
- Comprehensive README with examples
- Quick start guide
- Feature reference
- Real-world usage examples