Why don't you validate the params inside? like:
@ResponseStatus(HttpStatus.OK)
@GetMapping()
public void foo(@RequestParam(value = "someValue1", required = false) String someValue1,
@RequestParam(value = "someValue2", required = false) final String someValue2) {
// Do validation here
if (someValue1 == null && someValue2 == null) {
throw new BadRequestException("someValue1 or someValue2 has to be present");
}
if (someValue1 != null) {
// use someValue1
}
if (someValue2 != null) {
// use someValue2
}
}
Spring doesn't have an build in feature for that case, at least i don't know it