79631196

Date: 2025-05-20 21:34:54
Score: 2
Natty:
Report link

also you should use @Validated on class level in the controller

@RestController
@Validated
class Controller {
    @PostMapping("/hello")
    fun hello(@Valid @RequestBody messageDto: MessageDto) {
        messageDto.words.map(System.out::println)
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Validated
  • Low reputation (1):
Posted by: Pawel