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.
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: