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

Implement rule metadata service. #6148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

malithie
Copy link
Member

@malithie malithie commented Nov 22, 2024

Proposed changes in this pull request

Resolves wso2/product-is#21803

In order to populate the rule UI it should be possible to retrieve all fields and field value options that are needed to configure expressions.
This PR implements the core rule metadata service.

When should this PR be merged

Merging this PR releases the service component and the feature.
Feature will be bundled to the product over a separate PR. So note that merging this PR will not bundle the feature with the product.

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.18%. Comparing base (8c6b1d7) to head (db7185f).
Report is 8 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6148      +/-   ##
============================================
- Coverage     44.67%   40.18%   -4.50%     
- Complexity    13493    14781    +1288     
============================================
  Files          1578     1755     +177     
  Lines         98872   118699   +19827     
  Branches      16049    19847    +3798     
============================================
+ Hits          44175    47701    +3526     
- Misses        48073    63755   +15682     
- Partials       6624     7243     +619     
Flag Coverage Δ
unit 26.64% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@malithie malithie force-pushed the rule-meta branch 2 times, most recently from 338cead to d197adf Compare November 28, 2024 11:51
mapper.convertValue(value.get("value"), new TypeReference<Map<String, Object>>() {
});

Value.InputType inputType = Value.InputType.valueOf(valueObject.get("inputType").toString().toUpperCase());
Copy link
Contributor

Choose a reason for hiding this comment

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

"inputType"
Shall we define these as constants in the class ?

Comment on lines +76 to +78
ERROR_DUPLICATE_FIELD("65002", "Duplicate field found.",
"Field: %s from metadata provider: %s already exists in the rule metadata."),
;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ERROR_DUPLICATE_FIELD("65002", "Duplicate field found.",
"Field: %s from metadata provider: %s already exists in the rule metadata."),
;
ERROR_DUPLICATE_FIELD("65002", "Duplicate field found.",
"Field: %s from metadata provider: %s already exists in the rule metadata.");

Copy link

sonarcloud bot commented Nov 29, 2024

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.

Implement rule metadata service
3 participants