You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/09/18 10:49:04 UTC

[jira] [Commented] (SYNCOPE-694) PATCH and PUT update for users, groups and any objects

    [ https://issues.apache.org/jira/browse/SYNCOPE-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14805231#comment-14805231 ] 

ASF subversion and git services commented on SYNCOPE-694:
---------------------------------------------------------

Commit 9f73fa43555a47a455e121ee8d52b72925ac9b4f in syncope's branch refs/heads/master from [~ilgrosso]
[ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=9f73fa4 ]

[SYNCOPE-694] Implementation completed


> PATCH and PUT update for users, groups and any objects
> ------------------------------------------------------
>
>                 Key: SYNCOPE-694
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-694
>             Project: Syncope
>          Issue Type: Improvement
>            Reporter: Francesco Chicchiriccò
>            Assignee: Francesco Chicchiriccò
>              Labels: rest
>             Fix For: 2.0.0
>
>
> Currently {{AnyService}} (and its derivative, providing REST services for users, groups and any objects) defines the update method as follows:
> {code}
>     @POST
>     @Path("{key}")
>     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>     Response update(@NotNull MOD anyMod);
> {code}
> where {{MOD extends AnyMod}}.
> The idea is to move to a definition like as follows:
> {code}
>     @PATCH
>     @Path("{key}")
>     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>     Response update(@NotNull P anyPatch);
> {code}
> e.g. to more REST-compliant patch-based update.
> This has the additional benefit of simplifying the interaction with clients (JavaScript, in particular) not based on {{syncope-client}} Java library.
> It could also be useful to add a second update method as follows:
> {code}
>     @PUT
>     @Path("{key}")
>     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>     @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
>     Response update(@NotNull TO anyTO);
> {code}
> where {{TO extends AnyTO}}.
> This latter would allow to build simpler create / update interactions for clients based on {{syncope-client}} Java library.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)