Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSR 303 for REST [SPR-6928] #11593

Closed
spring-projects-issues opened this issue Mar 3, 2010 · 2 comments
Closed

Support JSR 303 for REST [SPR-6928] #11593

spring-projects-issues opened this issue Mar 3, 2010 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Eberhard Wolff opened SPR-6928 and commented

JSR 303 validation is not supported for REST methods. It would be nice if you could annotate a controller method with @Valid. This would validate the @RequestBody parameter and return 400 (bad request). If the resulting model contains invalid objects a 500 (internal server error) should be returned.

see http://blog.newsplore.com/2010/02/23/spring-mvc-3-0-rest-rebuttal "JSR 303 bean validation not applied in @Controllers"


Affects: 3.0 GA, 3.0.1

7 votes, 6 watchers

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Mar 15, 2010

Scott Frederick commented

This looks like a dup of #11375.

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

A RequestBodyNotValidException is raised and a 400 error returned as a result of validation errors. A summary of the errors is included in the response error message. See DefaultHandlerExceptionResolver for details.

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1 M2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants