Skip to content

Fixes #1375 - enum values are also considered during validation #3201

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

Closed
wants to merge 0 commits into from

Conversation

jfshark
Copy link

@jfshark jfshark commented Mar 13, 2025

Issues

This pull request fixes #1375

Description

According to the discussion in #1375, enum value are valid arguments for the 'in' odata operator and should be allowed in validation (including string literals)

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Build and test with one-click build and test script passed

@jfshark
Copy link
Author

jfshark commented Mar 13, 2025 via email

@WanjohiSammy
Copy link
Member

@jfshark Could you add some tests

@@ -201,8 +201,11 @@ internal static void VerifyCollectionNode(CollectionNode node, bool enableCaseIn
{
if (item != null && item.Value != null && item.Value is ODataEnumValue enumValue)
{
if (!enumType.ContainsMember(enumValue.Value, comparison))
{
if (!enumType.ContainsMember(enumValue.Value, comparison) &&
Copy link
Member

Choose a reason for hiding this comment

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

Realignment

@gathogojr
Copy link
Contributor

@jfshark Please add tests to verify your change. Also rebase

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.

IN operator on an ENUM value causes an exception
3 participants