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

A fix for "show allowed values in help text" #375

Merged
merged 2 commits into from
Aug 28, 2020
Merged

A fix for "show allowed values in help text" #375

merged 2 commits into from
Aug 28, 2020

Conversation

scott-xu
Copy link
Contributor

@scott-xu scott-xu commented Jun 23, 2020

This is a follow up fix for #369
This fixes an issue where it only finds AllowedValuesAttribute from the first attribute validator.

Find `AllowedValuesAttribute` from all validators
@natemcmaster
Copy link
Owner

natemcmaster commented Jun 28, 2020

Thanks for creating a PR. Can you describe more about what this is addressing? Also, can you add a test case? I don't see what is different between this change and the existing code.

@scott-xu
Copy link
Contributor Author

Sure I’ll add UT.

Add UT.
If there are multiple attribute validators, loop through them and try find  `AllowedValuesAttribute`. The previous logic is to check the first attribute validator and see if it is `AllowedValuesAttribute` which is not correct.
@scott-xu
Copy link
Contributor Author

If there are multiple attribute validators, loop through them and try find AllowedValuesAttribute.
The previous logic is to check the first attribute validator and see if it is AllowedValuesAttribute which is not correct.

@scott-xu scott-xu changed the title Update DefaultHelpTextGenerator.cs A fix for "show allowed values in help text“ Jul 26, 2020
@scott-xu scott-xu changed the title A fix for "show allowed values in help text“ A fix for "show allowed values in help text" Aug 3, 2020
Copy link
Owner

@natemcmaster natemcmaster left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@natemcmaster natemcmaster merged commit 497f598 into natemcmaster:main Aug 28, 2020
@natemcmaster natemcmaster added this to the 3.1.0 milestone Aug 28, 2020
@scott-xu scott-xu deleted the patch-1 branch August 28, 2020 12:35
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.

2 participants