[
https://issues.jboss.org/browse/FORGE-1422?page=com.atlassian.jira.plugin...
]
Vineet Reynolds commented on FORGE-1422:
----------------------------------------
[~epbernard], [~ron_sigal], thanks for your comments. I think this feature is exactly what
would help here, with of course client-side logic to parse the JSON and display errors in
the UI.
The reason why the generated REST resources dont use RESTEasy is because the generator is
designed to emit code with only Java EE 6/7 APIs. All of the commands in the Java EE addon
(of which the REST command is one) are designed this way (to use only the standards).
I'd say that based on your comments, it would be beneficial to create a RESTEasy addon
in Forge that wouldn't be constrained by this limitation.
The other alternative is to perform contextual code generation based on the presence of a
JBoss BOM, but we haven't come anywhere close to realizing this. And if we do this the
lazy way (by hoisting it into the Java EE addon) it might bloat the addon, and also result
in people demanding support for other JAX-RS stacks.
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