Skip to content

Instantly share code, notes, and snippets.

@mkuehle
Created October 20, 2016 09:50
Show Gist options
  • Save mkuehle/ac2098db01e57c1c161d6e28841c874e to your computer and use it in GitHub Desktop.
Save mkuehle/ac2098db01e57c1c161d6e28841c874e 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\": null,\"email\": null}" 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 angegeben werden",
"value": ""
},
{
"constraintType": "PARAMETER",
"path": "createUser.arg0.email",
"message": "Die E-Mail Adresse ist ein Pflichtfeld",
"value": ""
}
],
"returnValueViolations": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment