@ Get ( "/hello/{name}" ) public String hello ( @ Size ( min = 3 , max = 10 , message = "name should have between 3 and 10 characters" ) @ Param String name ) { return String . format ( "Hello, %s! This message is from Armeria annotated service!" , name ) ; }
An example in order to show how to use validation framework in an annotated HTTP service .