Skip to content

Enhance nested structure reuse with use_entity#41

Merged
afuno merged 4 commits intomainfrom
feature/SRV-353/nested_entity_2
Dec 20, 2025
Merged

Enhance nested structure reuse with use_entity#41
afuno merged 4 commits intomainfrom
feature/SRV-353/nested_entity_2

Conversation

@afuno
Copy link
Member

@afuno afuno commented Dec 16, 2025

No description provided.

- 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.
@afuno afuno added this to the v1.0.0 milestone Dec 16, 2025
@afuno afuno self-assigned this Dec 16, 2025
@afuno afuno added the feature label Dec 16, 2025
- 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.
@afuno afuno marked this pull request as ready for review December 17, 2025 09:18
@afuno afuno merged commit 07a5f33 into main Dec 20, 2025
23 checks passed
@afuno afuno deleted the feature/SRV-353/nested_entity_2 branch December 20, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant