package com.hubspot.singularity.resources;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.singularity.SingularityService;
import com.hubspot.singularity.SingularityUser;
import com.hubspot.singularity.SingularityUserSettings;
import com.hubspot.singularity.data.UserManager;

@Path(UserResource.PATH)
@Produces({ MediaType.APPLICATION_JSON })
public class UserResource {
  public static final String PATH = SingularityService.API_BASE_PATH + "/user";

  private final UserManager userManager;

  @Inject
  public UserResource(UserManager userManager) {
    this.userManager = userManager;
  }

  @GET
  @Path("/settings")
  public Optional<SingularityUserSettings> getUserSettings() {
    if (user.isPresent()) {
      return userManager.getUserSettings(user.get().getId());
    }
    return Optional.absent();
  }
}

@@ -86,16 +86,46 @@
 s.Path;%0A
+import javax.ws.rs.PathParam;%0A
 import j
@@ -145,16 +145,16 @@
 oduces;%0A
-
 import j
@@ -309,56 +309,8 @@
 ce;%0A
-import com.hubspot.singularity.SingularityUser;%0A
 impo
@@ -409,16 +409,65 @@
 Manager;
+%0Aimport com.wordnik.swagger.annotations.ApiParam;
 %0A%0A@Path(
@@ -869,42 +869,77 @@
 ngs(
-) %7B
 %0A    
-if (user.isPresent()
+  @ApiParam(%22The user id to use%22) @PathParam(%22id%22) String id
 ) %7B%0A
-  
     
@@ -977,62 +977,10 @@
 ngs(
-user.get().getId());%0A    %7D%0A    return Optional.absent(
+id
 );%0A 

Add user id param to getUserSettings