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

fix: validate every item of QuerySpec filterExpression #3467

Merged

Conversation

ndr-brt
Copy link
Member

@ndr-brt ndr-brt commented Sep 25, 2023

What this PR changes/adds

Validate all the Criterion.filterExpression items instead of the first one only.

Why it does that

fix bug

Further notes

  • improved the Criterion validation itself, the "rightOperand" must be considered mandatory as in the EDC there are no operators that permit an empty rightOperand
  • some documentation added

Linked Issue(s)

Closes #3424

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@ndr-brt ndr-brt added bug Something isn't working api Feature related to the (REST) api labels Sep 25, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 87.50% and project coverage change: +0.01% 🎉

Comparison is base (f981237) 72.09% compared to head (958dee7) 72.11%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3467      +/-   ##
==========================================
+ Coverage   72.09%   72.11%   +0.01%     
==========================================
  Files         836      836              
  Lines       16985    16987       +2     
  Branches      947      947              
==========================================
+ Hits        12246    12250       +4     
+ Misses       4335     4333       -2     
  Partials      404      404              
Files Changed Coverage Δ
...alidator/jsonobject/validators/MandatoryValue.java 90.00% <0.00%> (-10.00%) ⬇️
.../edc/validator/jsonobject/JsonObjectValidator.java 100.00% <100.00%> (ø)
...sonobject/validators/model/CriterionValidator.java 88.88% <100.00%> (+0.65%) ⬆️
...sonobject/validators/model/QuerySpecValidator.java 92.85% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

Copy link
Member

@paullatzelsperger paullatzelsperger left a comment

Choose a reason for hiding this comment

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

LGTM

@ndr-brt ndr-brt merged commit e93e496 into eclipse-edc:main Sep 25, 2023
20 checks passed
@ndr-brt ndr-brt deleted the 3424-fix-query-spec-validator branch September 25, 2023 14:00
ndkrimbacher pushed a commit to nexyo-io/DataSpaceConnector that referenced this pull request Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Feature related to the (REST) api bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuerySpecValidator fails to catch errors when filterExpression has more than one objects
4 participants