Below is one complete set of annotation including a class and method.
@Service("userRest")
@Path("/user")
@Api(value = "/user", description = "get users by id and criteria")
public class UserResourceImpl implements UserResource{
@GET
@Path("/{userId}")
@Produces("application/json")
@ApiOperation(value = "Get user by ID", response = RemoteUser.class)
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "User not found") })
public Response getUserById(
@ApiParam(value = "ID of user that needs to be fetched", required = true)
@PathParam("userId") String userId,
@ApiParam(value = "Token stored in cookie", required = false)
@CookieParam("token") Cookie token) {
}
}
Thanks,
Pratz