Antonio Goncalves created FORGE-1275:
----------------------------------------
Summary: @PUT method shouldn't have a @Path
Key: FORGE-1275
URL:
https://issues.jboss.org/browse/FORGE-1275
Project: Forge
Issue Type: Bug
Components: Scaffold
Affects Versions: 1.4.2.Final
Reporter: Antonio Goncalves
Hi,
In the REST scaffolding, the generate {{update}} method looks like this :
{code}
@PUT
@Path("/{id:[0-9][0-9]*}")
@Consumes("application/xml")
public Response update(Book entity) {
em.merge(entity);
return Response.noContent().build();
}
{code}
The method has a {{@Path}} annotation with an id and therefore cannot be invoked (without
the id that is not used in the method). So it should simply be :
{code}
@PUT
@Consumes("application/xml")
public Response update(Book entity) {
em.merge(entity);
return Response.noContent().build();
}
{code}
--
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