spring-data-rest: `@Valid` is not supported on `@BasePathAwareController`
Bob Tiernay opened DATAREST-593 and commented
@Valid annotations are not respected on @RepositoryRestController annotated controllers as they are with @Controller and @RestController classes. This breaks with convention and expectation of developers.
Affects: 2.3 GA (Fowler)
Issue Links:
- DATAREST-1266
@BasePathAwareControllerdisables DTO validation (“is duplicated by”)
15 votes, 18 watchers
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 27
Commits related to this issue
- Fix RepositoryRestController is not support Valid fixes #967 — committed to senekis316/spring-data-rest by deleted user 2 years ago
- Register MVC validator with Spring Data REST HandlerAdapter. Fixes: #967. Original pull request: 2108. — committed to spring-projects/spring-data-rest by odrotbohm a year ago
- Register MVC validator with Spring Data REST HandlerAdapter. Fixes: #967. Original pull request: 2108. — committed to spring-projects/spring-data-rest by odrotbohm a year ago
Andrea Ratto commented
Basically I think that
@Validshould work on@RequestMappingmethods, just like normal controllers. That is: