[forge-issues] [JBoss JIRA] (FORGE-1911) @PUT method should return a HTTP 409 for ID mismatch

Vineet Reynolds (JIRA) issues at jboss.org
Tue Dec 9 07:13:39 EST 2014


    [ https://issues.jboss.org/browse/FORGE-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026227#comment-13026227 ] 

Vineet Reynolds commented on FORGE-1911:
----------------------------------------

We should reintroduce the Id parameter into the @PUT annotated method. And we should add code similar to the following: https://github.com/jboss-developer/jboss-wfk-quickstarts/blob/2.6.x/contacts-mobile-basic/src/main/java/org/jboss/quickstarts/wfk/contact/ContactRESTService.java#L183-L187

> @PUT method should return a HTTP 409 for ID mismatch
> ----------------------------------------------------
>
>                 Key: FORGE-1911
>                 URL: https://issues.jboss.org/browse/FORGE-1911
>             Project: Forge
>          Issue Type: Feature Request
>          Components: Java EE
>    Affects Versions: 2.6.0.Final
>            Reporter: Vineet Reynolds
>             Fix For: 2.x Future
>
>
> The @Path value for @PUT method should match the supplied Id field (not necessarily named id, but whatever is the named of the primary key) in the supplied HTTP request body.
> A mismatch here would indicate an attempt was made to update the Id, which is incorrect as per the JPA spec. A HTTP 409 (conflict) is a valid response code in such a case.



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the forge-issues mailing list