Skip to content

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

@sonarqubecloud
Copy link

@loicgreffier loicgreffier added the feature This issue or pull request contains 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 or pull request contains a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants