[
https://issues.jboss.org/browse/FORGE-1422?page=com.atlassian.jira.plugin...
]
Ron Sigal commented on FORGE-1422:
----------------------------------
The reporting format of constraint violations in Resteasy is described here:
http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html/Validation....
The report, which can be transmitted in XML, JSON, and text format, contains four fields
per violation:
# type of violated constraint
# path to violating element
# error message
# description of value in error
For example:
{noformat}
[FIELD]
[s]
[size must be between 2 and 4]
[a]
[PROPERTY]
[t]
[size must be between 3 and 5]
[z]
[CLASS]
[]
[Concatenation of s and t must have length > 5]
[org.jboss.resteasy.validation.TestResource@68467a6f]
[PARAMETER]
[test.<cross-parameter>]
[Parameters must total <= 7]
[[5, 7]]
[RETURN_VALUE]
[g.<return value>]
[size must be between 2 and 4]
[abcde]
{noformat}
REST addon should support generation of exception mappers for
validation errors
-------------------------------------------------------------------------------
Key: FORGE-1422
URL:
https://issues.jboss.org/browse/FORGE-1422
Project: Forge
Issue Type: Feature Request
Components: Builtin Plugins
Affects Versions: 2.0.0.Beta4
Reporter: Vineet Reynolds
Assignee: Vineet Reynolds
Currently a HTTP 500 response is generated for validation errors encountered during
processing of POST/PUT requests that create or update JPA entities. The 500 response
contains a stacktrace that cannot be parsed by clients to evaluate what failed.
We should generate exception mappers that can map Bean validation errors to help generate
parseable responses (for the REST clients).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira