Summary
Implement auto-flattening by PascalCase convention with proper init/required property support.
Originally Feature 2 in the v1.4 spec (docs/SPEC-v1.4-advanced-mapping.md), moved to v1.5 to prioritize issues #80 and #81.
Key Points
- Auto-resolve unmatched destination properties by splitting PascalCase names and walking the source object graph (e.g.,
CustomerName → source.Customer.Name)
- Route
init/required properties to object initializer (fixes what's broken in Mapperly since mid-2023)
- Greedy match algorithm with configurable case sensitivity
- Unflattening support via
[ReverseForge]
- Controllable via
AutoFlatten property on [ForgeMap] / [ForgeMapDefaults]
Diagnostics
- FM0033 (Info): Property auto-flattened notification
- FM0034 (Error): Unflattening target type not constructible
- FM0035 (Warning): Property cannot be unflattened
See docs/SPEC-v1.4-advanced-mapping.md Feature 2 for full specification.
Summary
Implement auto-flattening by PascalCase convention with proper
init/requiredproperty support.Originally Feature 2 in the v1.4 spec (
docs/SPEC-v1.4-advanced-mapping.md), moved to v1.5 to prioritize issues #80 and #81.Key Points
CustomerName→source.Customer.Name)init/requiredproperties to object initializer (fixes what's broken in Mapperly since mid-2023)[ReverseForge]AutoFlattenproperty on[ForgeMap]/[ForgeMapDefaults]Diagnostics
See
docs/SPEC-v1.4-advanced-mapping.mdFeature 2 for full specification.