Esempio n. 1
0
 @POST
 @Path("/createWithList")
 @ApiOperation(value = "Creates list of users with given input array")
 public Response createUsersWithListInput(
     @ApiParam(value = "List of user object", required = true) java.util.List<User> users) {
   for (User user : users) {
     userData.addUser(user);
   }
   return Response.ok().entity("").build();
 }
Esempio n. 2
0
 @PUT
 @Path("/{username}")
 @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.")
 @ApiResponses(
     value = {
       @ApiResponse(code = 400, message = "Invalid user supplied"),
       @ApiResponse(code = 404, message = "User not found")
     })
 public Response updateUser(
     @ApiParam(value = "name that need to be deleted", required = true) @PathParam("username")
         String username,
     @ApiParam(value = "Updated user object", required = true) User user) {
   userData.addUser(user);
   return Response.ok().entity("").build();
 }
Esempio n. 3
0
 @POST
 @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.")
 public Response createUser(@ApiParam(value = "Created user object", required = true) User user) {
   userData.addUser(user);
   return Response.ok().entity("").build();
 }