Enhance nested structure reuse with use_entity#41
Merged
Conversation
- Introduced `use_entity` to support reusing Entity classes in nested structures like objects and arrays. - Ensured validation to prevent conflicting attribute definitions when using `use_entity`. - Updated documentation in `CLAUDE.md`, `cheatsheet.md`, and `nested-structures.md` with examples of `use_entity`. - Extended `AuthorDto` and `SocialDto` implementation for better demonstration of nested reuse. - Enhanced test coverage to validate proper behavior for `use_entity` in API requests and responses.
- Added a new section in `troubleshooting.md` addressing common issues with `use_entity`, such as invalid class usage, improper placement in blocks, and wrapper options. - Updated `internationalization.md` with new error messages and examples related to `use_entity`. - Included both English and German translations for new error messages. - Provided examples clarifying proper usage and constraints of `use_entity`.
- Extracted value copying logic into a new `deep_copy_value` method. - Enhanced recursive handling for Hash and Array structures, ensuring nested calls are consolidated within `deep_copy_value`. - Introduced frozen string checking for efficient duplication. - Added comprehensive documentation for both methods, detailing behavior and supported types.
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.
No description provided.