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

#258 - Add an endpoint that takes a structured query and validates it #265

Conversation

michael-82
Copy link
Collaborator

@michael-82 michael-82 commented Mar 19, 2024

  • Return invalid criteria (termcode/context) instead of just termcode
  • Replace old /validate endpoint with the new one
  • add swagger documentation for the endpoint
  • When no invalid terms are found, return an empty array instead of omitting the parameter
  • Don't include the invalid terms list in the structured query itself but create a new object ValidatedStructuredQuery, containing the original query and the list of invalid terms
  • Add a new endpoint that takes a structured query and sends back the same query with additional invalidTerms if present

- Return invalid criteria (termcode/context) instead of just termcode
- Replace old /validate endpoint with the new one
- add swagger documentation for the endpoint
- When no invalid terms are found, return an empty array instead of omitting the parameter
- Don't include the invalid terms list in the structured query itself but create a new object ValidatedStructuredQuery, containing the original query and the list of invalid terms
- Add a new endpoint that takes a structured query and sends back the same query with additional invalidTerms if present
@michael-82 michael-82 added the enhancement New feature or request label Mar 19, 2024
@michael-82 michael-82 self-assigned this Mar 19, 2024
@michael-82 michael-82 linked an issue Mar 19, 2024 that may be closed by this pull request
- fix a test that should mock getInvalidCriteria instead of getInvalidTermcodes
- update blaze container in tests to 0.25
@michael-82 michael-82 force-pushed the feature/258-add-an-endpoint-that-takes-a-structured-query-and-validates-it branch from 8495361 to 83775be Compare March 20, 2024 08:24
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 75.48%. Comparing base (f6d09ee) to head (b5c1a6d).
Report is 1 commits behind head on develop.

Files Patch % Lines
...end/terminology/validation/TermCodeValidation.java 72.72% 2 Missing and 1 partial ⚠️
...query/api/validation/StructuredQueryValidator.java 60.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #265      +/-   ##
=============================================
- Coverage      75.56%   75.48%   -0.09%     
- Complexity       540      543       +3     
=============================================
  Files            124      125       +1     
  Lines           2218     2235      +17     
  Branches         108      109       +1     
=============================================
+ Hits            1676     1687      +11     
- Misses           478      483       +5     
- Partials          64       65       +1     

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

- switch to invalid criteria where invalid term codes were still in place
@michael-82 michael-82 merged commit e759d71 into develop Mar 20, 2024
8 checks passed
@michael-82 michael-82 deleted the feature/258-add-an-endpoint-that-takes-a-structured-query-and-validates-it branch March 20, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an endpoint that takes a structured query and validates it
2 participants