Validation
Support work with spring-boot-starter-validation
.
@HttpExchange("${api.post.url}")
@Validated
public interface PostApi {
@GetExchange("/typicode/demo/posts/{id}")
Post getPost(@PathVariable("id") @Min(1) @Max(3) int id);
}
This approach ensures that validation rules are consistent across both client and server.