-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add CPE format validation in property setter #711
base: main
Are you sure you want to change the base?
Conversation
- Implemented regex-based validation for CPE format in the model. - Added tests to verify handling of invalid CPE strings. Signed-off-by: Saquib Saifee <saquibsaifee2@gmail.com>
Signed-off-by: Saquib Saifee <saquibsaifee2@gmail.com>
Signed-off-by: Saquib Saifee <saquibsaifee@ibm.com>
@jkowalleck have a look at this PR |
Signed-off-by: Saquib Saifee <saquibsaifee@ibm.com>
try: | ||
CPE(cpe) | ||
except NotImplementedError: | ||
raise ValueError(f'Invalid CPE format: {cpe}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavioral change is considered a breaking change.
Not a blocker, just a remark.
Thank you for your contribution, @saquibsaifee We have an schema-based validator in place already, so there already is a mechanism that can check for valid CPE. |
Signed-off-by: Saquib Saifee <saquibsaifee2@gmail.com>
Fixes #580
Note: