I have some rest API
@GetMapping(value = "/getSomething")
public String getSomething(@RequestParam(value = "name") String name)
Caller to the API can provide multiple instances of the name parameter
/getSomething?name=something&name=somethingElse
In the API code the name variable will be received as "something,somethingElse"
Is there a way yo prevent this behavior ?
accept only one "name" parameter?
or return "400" "bad request" for such a case?
Thanks