feat: support GUID collections and set-like CLR collections#99
Merged
Conversation
…odel - Added `RelatedIds`, `LegacyIds`, `AlternateIds`, `UniqueIds`, and `ContactIdsByRole` to `CanonicalModel`. - Updated `CanonicalModelFactory` to generate test data for new GUID fields. - Enhanced `CanonicalMapperTests` to validate round-trip mapping of GUID collections. - Extended `CanonicalModelAssertions` to include checks for new GUID collection fields. - Added `Collection_GuidShapes` test in `CollectionVerifyTests` for GUID collections.
…d HashSets - Introduced `CollectionReadMaterialization` enum to define additional materialization logic. - Enhanced `PropertyMappingCodeRenderer` to apply read materialization for arrays and HashSets. - Added logic to handle `HashSet` materialization in `MaterializeHashSet` helper. - Updated `CollectionInfo` to replace `IsArray` with `ReadMaterialization`. - Enhanced `CollectionTypeAnalyzer` to infer and apply read materialization for arrays and HashSets. - Fixed test case for `payload` property to remove redundant `.ToArray()` call. - Added snapshots for `Collection_GuidShapes` to validate GUID collection mapping logic.
… DynamoDB - Clarified the use of DynamoDB native set types (`SS`, `NS`, `BS`) for supported element types. - Explained storage and materialization behavior for unsupported set element types like `Guid`, `DateTimeOffset`, and enums. - Updated type matrix reference to describe round-trip preservation of set-like CLR shapes.
- Enhanced mapping logic to allow custom formats for scalars in collections (e.g., `Guid`, `TimeSpan`, `Enum`). - Updated `AttributeValueExtensions` to handle nullable and non-nullable lists/maps with scalar formatting. - Extended `TypeMappingStrategy` to include format-specific arguments for scalar collections. - Added integration tests for round-trip validation of formatted scalar collections. - Updated snapshots and test coverage for formatted scalar collection mapping.
- Changed categories for existing analyzer rules in `AnalyzerReleases.Unshipped.md`. - Added release `1.2.0` details with new analyzer rules in `AnalyzerReleases.Shipped.md`. - Updated `.editorconfig` to include formatting settings for additional files.
- Updated `VersionPrefix` in `Directory.Build.props` to prepare for the 1.3.0 release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds generator support for GUID-based collection shapes and broadens materialization for set-like CLR collections such as
HashSet<T>. It also extends the canonical model and docs so the new collection behavior is covered by integration tests and user-facing guidance.Changes
Validation
dotnet test --project test/LayeredCraft.DynamoMapper.Generators.Tests/LayeredCraft.DynamoMapper.Generators.Tests.csproj -f net10.0 -v q --no-progress --no-ansiRS2001analyzer warnings were emitted fromDiagnosticDescriptors.csduring the test runRelease Notes