You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org> on 2015/09/16 08:19:46 UTC
[jira] [Created] (SYNCOPE-694) PATCH and PUT update for users,
groups and any objects
Francesco Chicchiriccò created SYNCOPE-694:
----------------------------------------------
Summary: 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ò
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)