-
Notifications
You must be signed in to change notification settings - Fork 2
Description
When comparing a COUNTER API request for a report with the response, invalid attribute and filter values included in the request currently are not handled properly. If the COUNTER API server ignores an invalid value and adds the appropriate Exception to the report header, which is the expected way to handle invalid attribute and filter values, this will result in a validation error for a mismatch between request and response, which is wrong and needs to be fixed.
For example a request for a TR with data_type=Journal in the request must result in a report with a .Report_Header.Report_Filters.Data_Type value of [ Journal ]. A different or missing Data_Type filter is an error and will be flagged accordingly. A request for a TR with data_type=Journal|Article must also result in a report with a .Report_Header.Report_Filters.Data_Type value of [ Journal ], and an Exception 3060 in .Report_Header.Exceptions for the value Article which is not permitted in TR. The current validation error that the Data_Type does not match the request is wrong, instead the validation must ignore invalid values when comparing the request and the response and check whether the appropriate Exception is included in the response.
For request parameters with a list of permitted values like data_type this should be straight forward, for other parameters and especially begin_date and end_date, where a lot of different cases need to be handled, this will be more complex.