Skip to content

Instantly share code, notes, and snippets.

@mkuehle
Created October 20, 2016 09:51
Show Gist options
  • Save mkuehle/3e3ecf728e138103f8f528f617a74f17 to your computer and use it in GitHub Desktop.
Save mkuehle/3e3ecf728e138103f8f528f617a74f17 to your computer and use it in GitHub Desktop.
Java EE 7 - JAX-RS Bean Validation - DTO Test
curl -i -XPOST -H "Content-Type: application/json" -d "{\"name\": \"d\",\"email\": \"bla@coodoo.de\"}" http://localhost:8080/jee-jaxrs-validation/resources/users
HTTP/1.1 400 Bad Request
{
"exception": null,
"fieldViolations": [],
"propertyViolations": [],
"classViolations": [],
"parameterViolations": [
{
"constraintType": "PARAMETER",
"path": "createUser.arg0.name",
"message": "Der Name muss zwischen 3 und 10 Zeichen lang sein",
"value": "d"
}
],
"returnValueViolations": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment