Skip to content
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

Keep alias_name when method_added (#135) #136

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

hkdnet
Copy link
Contributor

@hkdnet hkdnet commented Apr 18, 2023

method_added removes the same name attribute from attributes and add a new one to method_fields. It ignores alias_name of the original attribute.
Then the alias setting does not work with method fields.

With this patch, the original alias_name is kept.

In addition, serialize_method_fields does not use attr_name_for_serialization unlike other serialize functions. This patch also fixes it to use the function.

`method_added` removes the same name attribute from `attributes` and add a new one to `method_fields`. It ignores `alias_name` of the original attribute.
Then the alias setting does not work with method fields.

With this patch, the original `alias_name` is kept.

In addition, `serialize_method_fields` does not use `attr_name_for_serialization` unlike other serialize functions. This patch also fixes it to use the function.
Copy link
Owner

@yosiat yosiat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for your contribution !

@yosiat yosiat merged commit c5d8c77 into yosiat:master Apr 30, 2023
13 checks passed
@hkdnet hkdnet deleted the alias-for-method branch April 30, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants