-
Notifications
You must be signed in to change notification settings - Fork 0
Fix data_type_identifier to_h #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix data_type_identifier to_h #159
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes the to_h serialization method for DataTypeIdentifier to ensure it only returns the populated field (one of: data_type_identifier, generic_type, or generic_key) rather than all fields with nil values. Additionally, it updates related serialization/deserialization methods in GenericType and GenericMapper classes to handle renamed fields (generic_mapper → generic_mappers).
- Modified
DataTypeIdentifier#to_hto return only the populated field using conditional logic - Updated
GenericType#to_hand#from_hashto usegeneric_mappers(plural) instead ofgeneric_mapper(singular) - Refactored
GenericMapper#to_hand#from_hashto use new field names (target,source,generic_combinations)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| build/ruby/lib/tucana/shared/shared.data_type.rb | Implemented conditional serialization in DataTypeIdentifier#to_h and updated field names in GenericType and GenericMapper classes |
| build/ruby/spec/tucana/shared/shared.data_type_spec.rb | Added test coverage for DataTypeIdentifier#to_h method with three variants (generic_key, identifier, generic_type) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dario Pranjic <96529060+Knerio@users.noreply.github.com>
4b78140 to
96ceedd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
close #158