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

introduce all_attribute_names #23324

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Feb 4, 2025

Before

attribute_alias values do not show up in attribute_names, so they are not discoverable.

After

all_attribute_names show attributes and aliases and can be used for api and automate methods.

See Also

def all_attribute_names
attribute_names | (try(:attribute_aliases)&.keys || [])
end

# @return Array[String] attribute names that can be advertised in the api and reporting
# Other attributes are accessible, they are just no longer in our public api (or never were)
Copy link
Member

Choose a reason for hiding this comment

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

What does this sentence mean? Can you provide an example?

Copy link
Member Author

Choose a reason for hiding this comment

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

The original text says "non-hidden attributes"

Copy link
Member

Choose a reason for hiding this comment

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

ok, let's merge it and if you think of a better way to describe it, we can edit it later. I don't have a better suggestion.

@jrafanie jrafanie merged commit bd85bc0 into ManageIQ:master Feb 4, 2025
7 checks passed
@kbrock kbrock deleted the available_attributes branch February 5, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants