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

Add new ContainsList validator #538

Merged
merged 2 commits into from
Mar 31, 2025
Merged

Conversation

AlexisSouquiere
Copy link
Collaborator

This PR adds a new validator "ContainsList". It checks that a field contains all the items from a list.
It helps in our case to prevent users from creating connectors on some topics by adding this validator to the topic.blacklist field.

  connectValidator:
    validationConstraints:
      topic.blacklist:
        validation-type: ContainsList
        mandatoryStrings:
            - ns1.topic1
            - ns1.topic2

Expected value

    topic.blacklist: ns1.topic1,ns1.topic2,ns1.otherTopicToBlacklist

@loicgreffier loicgreffier added the feature This issue adds a new feature label Mar 21, 2025
@AlexisSouquiere AlexisSouquiere marked this pull request as ready for review March 28, 2025 09:17
@AlexisSouquiere
Copy link
Collaborator Author

I will submit a PR to update the kafkactl readme once merged

Copy link
Collaborator

@loicgreffier loicgreffier left a comment

Choose a reason for hiding this comment

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

@AlexisSouquiere Looks good to me

@loicgreffier loicgreffier changed the title Adding new ContainsList validator Add new ContainsList validator Mar 31, 2025
@loicgreffier loicgreffier merged commit bfba65a into master Mar 31, 2025
4 checks passed
@loicgreffier loicgreffier deleted the feat/contains-list-validator branch March 31, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants