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

Change validation information #266

Closed
michael-82 opened this issue Mar 20, 2024 · 1 comment · Fixed by #271
Closed

Change validation information #266

michael-82 opened this issue Mar 20, 2024 · 1 comment · Fixed by #271
Assignees
Labels
enhancement New feature or request

Comments

@michael-82
Copy link
Collaborator

Currently, when getting validation information for structured queries, a JSON Array "invalidTerms" or "invalidCriteria" is added to the response, separate from the actual structured query object. Also, getting a list of queries or templates contains this information.
This shall be changed to the following:

  • Getting a list of queries or templates only includes the information whether a query is valid or not. isValid as boolean parameter. Will be omitted when skipValidation is true. The frontend currently only needs to display a warning sign if anything is wrong with the query, detailed information about what is wrong will be transported when the query is directly retrieved
  • When loading queries/templates directly by id, by default they will be validated. This can be disabled once more via skipValidation parameter which is false by default.
  • The validation information will be put directly in the structured query. For this iteration, it will be placed on criteria level at the same level as "context" or "termCodes" and will be an array named "issues". Each issue contains a code and a detailed description. Currently, the only check is whether the termcode/context combination can be found. If no errors occur, the issues list will still be there but be empty (@thkoehler11 @Shayan1375 - please confirm this last part). Issue codes will be introduced similar to the codes already in place e.g. when a quota is exceeded.
@michael-82 michael-82 added the enhancement New feature or request label Mar 20, 2024
@michael-82 michael-82 self-assigned this Mar 20, 2024
@thkoehler11
Copy link

thkoehler11 commented Mar 20, 2024

Confirming empty issues array, if no error occur.

@michael-82 michael-82 linked a pull request Mar 21, 2024 that will close this issue
michael-82 added a commit that referenced this issue Mar 21, 2024
- add mutable criterion and structured query classes that can be easily annotated during validation. Provide converters to convert immutable to mutable and vice versa
- remove validatedstructuredquery
- add validation issues
- remove invalidCriteria from entities
michael-82 added a commit that referenced this issue Mar 21, 2024
- rename TermCodeValidation to StructuredQueryValidation
- remove ValidationIssues and directly use List<ValidationIssue>
michael-82 added a commit that referenced this issue Mar 21, 2024
- rename getinvalidcriteria
- modify tests
michael-82 added a commit that referenced this issue Mar 21, 2024
- add skipValidation parameter to get query and get template
michael-82 added a commit that referenced this issue Mar 22, 2024
- increase test coverage
michael-82 added a commit that referenced this issue Mar 22, 2024
- modify swagger file
michael-82 added a commit that referenced this issue Mar 22, 2024
* #266 - Change validation information

- add mutable criterion and structured query classes that can be easily annotated during validation. Provide converters to convert immutable to mutable and vice versa
- remove validatedstructuredquery
- add validation issues
- remove invalidCriteria from entities
- rename TermCodeValidation to StructuredQueryValidation
- rename getinvalidcriteria
- modify tests
- add skipValidation parameter to get query and get template
- modify swagger file
@michael-82 michael-82 added this to the Release 5.0.0-alpha.1 milestone Mar 26, 2024
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 a pull request may close this issue.

2 participants