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

MockMVC is not triggering Javax.Constraint.Validation for List of Objects #24260

Closed
SumithraPrasad opened this issue Dec 24, 2019 · 3 comments
Closed
Labels
status: duplicate A duplicate of another issue

Comments

@SumithraPrasad
Copy link

@RestController
@Validated
@Slf4j
public class TestController {

  @PostMapping(value = "/v1/test", produces = "application/json", consumes = "application/json")
  @ResponseStatus(HttpStatus.CREATED)
  public void postTest(@Valid @RequestBody List<TestDTO> testList) {
  }
}

MockMVC is not throwing BadRequest but when service is hit from postman we get BadRequest

@snicoll snicoll transferred this issue from spring-projects/spring-boot Dec 24, 2019
@snicoll
Copy link
Member

snicoll commented Dec 24, 2019

Duplicate of #16917

@snicoll snicoll marked this as a duplicate of #16917 Dec 24, 2019
@snicoll snicoll closed this as completed Dec 24, 2019
@snicoll snicoll added the status: duplicate A duplicate of another issue label Dec 24, 2019
@SumithraPrasad

This comment has been minimized.

@snicoll

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants