Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Pacane
Created February 17, 2016 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pacane/c6666700a65f74ab56da to your computer and use it in GitHub Desktop.
Save Pacane/c6666700a65f74ab56da to your computer and use it in GitHub Desktop.
@Path(ApiPaths.USERS)
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
public interface UserApi {
@GET
List<User> getUsers();
@DELETE
@Path(ApiPaths.PATH_ID)
List<User> delete(@PathParam(ApiParameters.ID) int userId);
@GET
@Path(ApiPaths.PATH_ID)
User getUser(@PathParam(ApiParameters.ID) int userId);
@PUT
@Path(ApiPaths.PATH_ID)
void saveUser(@PathParam(ApiParameters.ID) int userId, User user);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment