Clean up source code of REST API

- Add missing @Produces annotation
- Correct comments
- Restrict variable access level

Change-Id: I7f75650b83651248370e7781b1e8aec7eac2314c
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ClusterWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/ClusterWebResource.java
index 3c07934..250fd02 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/ClusterWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/ClusterWebResource.java
@@ -28,6 +28,8 @@
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.io.IOException;
 import java.io.InputStream;
@@ -42,16 +44,17 @@
 @Path("cluster")
 public class ClusterWebResource extends AbstractWebResource {
 
-    public static final String NODE_NOT_FOUND = "Node is not found";
+    private static final String NODE_NOT_FOUND = "Node is not found";
 
     /**
      * Get all cluster nodes.
      * Returns array of all cluster nodes.
      *
-     * @return 200 OK
+     * @return 200 OK with a collection of cluster nodes
      * @onos.rsModel Cluster
      */
     @GET
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getClusterNodes() {
         Iterable<ControllerNode> nodes = get(ClusterService.class).getNodes();
         return ok(encodeArray(ControllerNode.class, "nodes", nodes)).build();
@@ -62,11 +65,12 @@
      * Returns details of the specified cluster node.
      *
      * @param id cluster node identifier
-     * @return 200 OK
+     * @return 200 OK with a cluster node
      * @onos.rsModel ClusterNode
      */
     @GET
     @Path("{id}")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getClusterNode(@PathParam("id") String id) {
         ControllerNode node = nullIsNotFound(get(ClusterService.class).getNode(new NodeId(id)),
                                              NODE_NOT_FOUND);
@@ -84,6 +88,7 @@
      */
     @POST
     @Path("configuration")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response formCluster(InputStream config) throws IOException {
         JsonCodec<ControllerNode> codec = codec(ControllerNode.class);
         ObjectNode root = (ObjectNode) mapper().readTree(config);
@@ -93,5 +98,4 @@
 
         return Response.ok().build();
     }
-
 }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ComponentConfigWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/ComponentConfigWebResource.java
index cc57581..d1a8ff7 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/ComponentConfigWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/ComponentConfigWebResource.java
@@ -26,6 +26,7 @@
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.io.IOException;
@@ -41,12 +42,13 @@
 public class ComponentConfigWebResource extends AbstractWebResource {
 
     /**
-     * Get all component configurations.
+     * Gets all component configurations.
      * Returns collection of all registered component configurations.
      *
-     * @return 200 OK
+     * @return 200 OK with a collection of component configurations
      */
     @GET
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getComponentConfigs() {
         ComponentConfigService service = get(ComponentConfigService.class);
         Set<String> components = service.getComponentNames();
@@ -56,13 +58,14 @@
     }
 
     /**
-     * Get configuration of the specified component.
+     * Gets configuration of the specified component.
      *
      * @param component component name
-     * @return 200 OK
+     * @return 200 OK with a collection of component configurations
      */
     @GET
     @Path("{component}")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getComponentConfigs(@PathParam("component") String component) {
         ComponentConfigService service = get(ComponentConfigService.class);
         ObjectNode root = mapper().createObjectNode();
@@ -80,7 +83,7 @@
     }
 
     /**
-     * Selectively set configuration properties.
+     * Selectively sets configuration properties.
      * Sets only the properties present in the JSON request.
      *
      * @param component component name
@@ -97,11 +100,11 @@
         ObjectNode props = (ObjectNode) mapper().readTree(request);
         props.fieldNames().forEachRemaining(k -> service.setProperty(component, k,
                                                                      props.path(k).asText()));
-        return Response.noContent().build();
+        return Response.ok().build();
     }
 
     /**
-     * Selectively clear configuration properties.
+     * Selectively clears configuration properties.
      * Clears only the properties present in the JSON request.
      *
      * @param component component name
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ConfigWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/ConfigWebResource.java
index ab64e31..0c75c17 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/ConfigWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/ConfigWebResource.java
@@ -15,15 +15,8 @@
  */
 package org.onosproject.rest.resources;
 
-import java.io.InputStream;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.onlab.rest.BaseResource;
 import org.onosproject.net.device.DeviceProviderRegistry;
 import org.onosproject.net.device.DeviceService;
@@ -32,8 +25,12 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.InputStream;
 
 import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR;
 
@@ -54,7 +51,6 @@
     @POST
     @Path("topology")
     @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
     public Response topology(InputStream input) {
         try {
             ObjectMapper mapper = new ObjectMapper();
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/DeviceKeyWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/DeviceKeyWebResource.java
index b4f04d1..8eddc06 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/DeviceKeyWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/DeviceKeyWebResource.java
@@ -47,7 +47,7 @@
 public class DeviceKeyWebResource extends AbstractWebResource {
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
     private static final String DEVICE_KEY_NOT_FOUND = "Device key was not found";
 
@@ -55,25 +55,27 @@
      * Gets all device keys.
      * Returns array of all device keys.
      *
-     * @return 200 OK
+     * @return 200 OK with a collection of device keys
      * @onos.rsModel Devicekeys
      */
     @GET
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getDeviceKeys() {
         Iterable<DeviceKey> deviceKeys = get(DeviceKeyService.class).getDeviceKeys();
         return ok(encodeArray(DeviceKey.class, "keys", deviceKeys)).build();
     }
 
     /**
-     * Get a single device key by device key unique identifier.
+     * Gets a single device key by device key unique identifier.
      * Returns the specified device key.
      *
      * @param id device key identifier
-     * @return 200 OK, 404 not found
+     * @return 200 OK with a device key, 404 not found
      * @onos.rsModel Devicekey
      */
     @GET
     @Path("{id}")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getDeviceKey(@PathParam("id") String id) {
         DeviceKey deviceKey = nullIsNotFound(get(DeviceKeyService.class).getDeviceKey(DeviceKeyId.deviceKeyId(id)),
                                              DEVICE_KEY_NOT_FOUND);
@@ -115,10 +117,11 @@
      * Removes a device key by device key identifier.
      *
      * @param id device key identifier
-     * @return 200 OK, 404 not found
+     * @return 200 OK with a removed device key, 404 not found
      */
     @DELETE
     @Path("{id}")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response removeDeviceKey(@PathParam("id") String id) {
         DeviceKey deviceKey = nullIsNotFound(get(DeviceKeyService.class).getDeviceKey(DeviceKeyId.deviceKeyId(id)),
                                              DEVICE_KEY_NOT_FOUND);
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/DevicesWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/DevicesWebResource.java
index dc4f405..76641da 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/DevicesWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/DevicesWebResource.java
@@ -26,6 +26,8 @@
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.util.List;
 
@@ -39,31 +41,33 @@
 @Path("devices")
 public class DevicesWebResource extends AbstractWebResource {
 
-    public static final String DEVICE_NOT_FOUND = "Device is not found";
+    private static final String DEVICE_NOT_FOUND = "Device is not found";
 
     /**
-     * Get all infrastructure devices.
+     * Gets all infrastructure devices.
      * Returns array of all discovered infrastructure devices.
      *
-     * @return 200 OK
+     * @return 200 OK with a collection of devices
      * @onos.rsModel DevicesGet
      */
     @GET
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getDevices() {
         Iterable<Device> devices = get(DeviceService.class).getDevices();
         return ok(encodeArray(Device.class, "devices", devices)).build();
     }
 
     /**
-     * Get details of infrastructure device.
+     * Gets details of infrastructure device.
      * Returns details of the specified infrastructure device.
      *
      * @param id device identifier
-     * @return 200 OK
+     * @return 200 OK with a device
      * @onos.rsModel DeviceGet
      */
     @GET
     @Path("{id}")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getDevice(@PathParam("id") String id) {
         Device device = nullIsNotFound(get(DeviceService.class).getDevice(deviceId(id)),
                                        DEVICE_NOT_FOUND);
@@ -71,15 +75,16 @@
     }
 
     /**
-     * Remove infrastructure device.
+     * Removes infrastructure device.
      * Administratively deletes the specified device from the inventory of
      * known devices.
      *
      * @param id device identifier
-     * @return 200 OK
+     * @return 200 OK with the removed device
      */
     @DELETE
     @Path("{id}")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response removeDevice(@PathParam("id") String id) {
         Device device = nullIsNotFound(get(DeviceService.class).getDevice(deviceId(id)),
                                        DEVICE_NOT_FOUND);
@@ -88,15 +93,16 @@
     }
 
     /**
-     * Get ports of infrastructure device.
+     * Gets ports of infrastructure device.
      * Returns details of the specified infrastructure device.
      *
      * @onos.rsModel DeviceGetPorts
      * @param id device identifier
-     * @return 200 OK
+     * @return 200 OK with a collection of ports of the given device
      */
     @GET
     @Path("{id}/ports")
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getDevicePorts(@PathParam("id") String id) {
         DeviceService service = get(DeviceService.class);
         Device device = nullIsNotFound(service.getDevice(deviceId(id)), DEVICE_NOT_FOUND);
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/FlowObjectiveWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/FlowObjectiveWebResource.java
index bdc31a9..615e5b1 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/FlowObjectiveWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/FlowObjectiveWebResource.java
@@ -45,14 +45,14 @@
 public class FlowObjectiveWebResource extends AbstractWebResource {
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
-    public static final String DEVICE_INVALID =
+    private static final String DEVICE_INVALID =
             "Invalid deviceId in objective creation request";
-    public static final String POLICY_INVALID = "Invalid policy";
+    private static final String POLICY_INVALID = "Invalid policy";
 
-    final FlowObjectiveService flowObjectiveService = get(FlowObjectiveService.class);
-    final ObjectNode root = mapper().createObjectNode();
+    private final FlowObjectiveService flowObjectiveService = get(FlowObjectiveService.class);
+    private final ObjectNode root = mapper().createObjectNode();
 
     /**
      * Creates and installs a new filtering objective for the specified device.
@@ -168,7 +168,7 @@
     /**
      * Returns the globally unique nextId.
      *
-     * @return nextId
+     * @return 200 OK with next identifier
      * @onos.rsModel NextId
      */
     @GET
@@ -183,13 +183,13 @@
      * Installs the filtering rules onto the specified device.
      *
      * @param stream filtering rule JSON
+     * @return 200 OK
      * @onos.rsModel ObjectivePolicy
      */
     @POST
     @Path("policy")
     @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public void initPolicy(InputStream stream) {
+    public Response initPolicy(InputStream stream) {
 
         try {
             ObjectNode jsonTree = (ObjectNode) mapper().readTree(stream);
@@ -200,13 +200,14 @@
             }
 
             flowObjectiveService.initPolicy(policyJson.asText());
+            return Response.ok().build();
         } catch (IOException e) {
             throw new IllegalArgumentException(e);
         }
     }
 
     /**
-     * Validate the deviceId that is contained in json string against the
+     * Validates the deviceId that is contained in json string against the
      * input deviceId.
      *
      * @param deviceId device identifier
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
index ec32b20..fc99c49 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
@@ -57,22 +57,23 @@
 public class FlowsWebResource extends AbstractWebResource {
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
-    public static final String DEVICE_NOT_FOUND = "Device is not found";
-    public static final String FLOW_NOT_FOUND = "Flow is not found";
-    public static final String FLOWS = "flows";
-    public static final String DEVICE_ID = "deviceId";
-    public static final String FLOW_ID = "flowId";
+    private static final String DEVICE_NOT_FOUND = "Device is not found";
+    private static final String FLOW_NOT_FOUND = "Flow is not found";
+    private static final String FLOWS = "flows";
+    private static final String DEVICE_ID = "deviceId";
+    private static final String FLOW_ID = "flowId";
 
-    final FlowRuleService service = get(FlowRuleService.class);
-    final ObjectNode root = mapper().createObjectNode();
-    final ArrayNode flowsNode = root.putArray(FLOWS);
+    private final FlowRuleService service = get(FlowRuleService.class);
+    private final ObjectNode root = mapper().createObjectNode();
+    private final ArrayNode flowsNode = root.putArray(FLOWS);
 
     /**
-     * Get all flow entries. Returns array of all flow rules in the system.
+     * Gets all flow entries. Returns array of all flow rules in the system.
+     *
+     * @return 200 OK with a collection of flows
      * @onos.rsModel Flows
-     * @return array of all the intents in the system
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -91,17 +92,17 @@
     }
 
     /**
-     * Create new flow rules. Creates and installs a new flow rules.<br>
+     * Creates new flow rules. Creates and installs a new flow rules.<br>
      * Instructions description:
      * https://wiki.onosproject.org/display/ONOS/Flow+Rule+Instructions
      * <br>
      * Criteria description:
      * https://wiki.onosproject.org/display/ONOS/Flow+Rule+Criteria
      *
-     * @onos.rsModel FlowsBatchPost
-     * @param stream   flow rules JSON
+     * @param stream flow rules JSON
      * @return status of the request - CREATED if the JSON is correct,
      * BAD_REQUEST if the JSON is invalid
+     * @onos.rsModel FlowsBatchPost
      */
     @POST
     @Consumes(MediaType.APPLICATION_JSON)
@@ -125,11 +126,12 @@
     }
 
     /**
-     * Get flow entries of a device. Returns array of all flow rules for the
+     * Gets flow entries of a device. Returns array of all flow rules for the
      * specified device.
-     * @onos.rsModel Flows
+     *
      * @param deviceId device identifier
-     * @return flow data as an array
+     * @return 200 OK with a collection of flows of given device
+     * @onos.rsModel Flows
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -148,12 +150,13 @@
     }
 
     /**
-     * Get flow rule. Returns the flow entry specified by the device id and
+     * Gets flow rule. Returns the flow entry specified by the device id and
      * flow rule id.
-     * @onos.rsModel Flows
+     *
      * @param deviceId device identifier
      * @param flowId   flow rule identifier
-     * @return flow data as an array
+     * @return 200 OK with a flows of given device and flow
+     * @onos.rsModel Flows
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -175,7 +178,7 @@
     }
 
     /**
-     * Create new flow rule. Creates and installs a new flow rule for the
+     * Creates new flow rule. Creates and installs a new flow rule for the
      * specified device. <br>
      * Instructions description:
      * https://wiki.onosproject.org/display/ONOS/Flow+Rule+Instructions
@@ -183,11 +186,11 @@
      * Criteria description:
      * https://wiki.onosproject.org/display/ONOS/Flow+Rule+Criteria
      *
-     * @onos.rsModel FlowsPost
      * @param deviceId device identifier
      * @param stream   flow rule JSON
      * @return status of the request - CREATED if the JSON is correct,
      * BAD_REQUEST if the JSON is invalid
+     * @onos.rsModel FlowsPost
      */
     @POST
     @Path("{deviceId}")
@@ -227,10 +230,9 @@
      * @return 204 NO CONTENT
      */
     @DELETE
-    @Produces(MediaType.APPLICATION_JSON)
     @Path("{deviceId}/{flowId}")
     public Response deleteFlowByDeviceIdAndFlowId(@PathParam("deviceId") String deviceId,
-                                              @PathParam("flowId") long flowId) {
+                                                  @PathParam("flowId") long flowId) {
         final Iterable<FlowEntry> flowEntries =
                 service.getFlowEntries(DeviceId.deviceId(deviceId));
 
@@ -248,10 +250,9 @@
      * Removes a batch of flow rules.
      *
      * @param stream stream for posted JSON
-     * @return NO CONTENT
+     * @return 204 NO CONTENT
      */
     @DELETE
-    @Produces(MediaType.APPLICATION_JSON)
     public Response deleteFlows(InputStream stream) {
         ListMultimap<DeviceId, Long> deviceMap = ArrayListMultimap.create();
         List<FlowEntry> rulesToRemove = new ArrayList<>();
@@ -265,9 +266,9 @@
                 DeviceId deviceId =
                         DeviceId.deviceId(
                                 nullIsNotFound(node.get(DEVICE_ID),
-                                               DEVICE_NOT_FOUND).asText());
+                                        DEVICE_NOT_FOUND).asText());
                 long flowId = nullIsNotFound(node.get(FLOW_ID),
-                                             FLOW_NOT_FOUND).asLong();
+                        FLOW_NOT_FOUND).asLong();
                 deviceMap.put(deviceId, flowId);
 
             });
@@ -288,5 +289,4 @@
         service.removeFlowRules(rulesToRemove.toArray(new FlowEntry[0]));
         return Response.noContent().build();
     }
-
 }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/GroupsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/GroupsWebResource.java
index 65a1a2f..5d61c0b 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/GroupsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/GroupsWebResource.java
@@ -54,19 +54,19 @@
 public class GroupsWebResource extends AbstractWebResource {
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
-    public static final String DEVICE_INVALID = "Invalid deviceId in group creation request";
-    public static final String GROUP_NOT_FOUND = "Group was not found";
+    private static final String DEVICE_INVALID = "Invalid deviceId in group creation request";
+    private static final String GROUP_NOT_FOUND = "Group was not found";
 
-    final GroupService groupService = get(GroupService.class);
-    final ObjectNode root = mapper().createObjectNode();
-    final ArrayNode groupsNode = root.putArray("groups");
+    private final GroupService groupService = get(GroupService.class);
+    private final ObjectNode root = mapper().createObjectNode();
+    private final ArrayNode groupsNode = root.putArray("groups");
 
     /**
      * Returns all groups of all devices.
      *
-     * @return array of all the groups in the system
+     * @return 200 OK with array of all the groups in the system
      * @onos.rsModel Groups
      */
     @GET
@@ -87,7 +87,7 @@
      * Returns all groups associated with the given device.
      *
      * @param deviceId device identifier
-     * @return array of all the groups in the system
+     * @return 200 OK with array of all the groups in the system
      * @onos.rsModel Groups
      */
     @GET
@@ -106,7 +106,7 @@
      *
      * @param deviceId device identifier
      * @param appCookie group key
-     * @return a group entry in the system
+     * @return 200 OK with a group entry in the system
      * @onos.rsModel Group
      */
     @GET
@@ -175,7 +175,6 @@
      * @return 204 NO CONTENT
      */
     @DELETE
-    @Produces(MediaType.APPLICATION_JSON)
     @Path("{deviceId}/{appCookie}")
     public Response deleteGroupByDeviceIdAndAppCookie(@PathParam("deviceId") String deviceId,
                                                       @PathParam("appCookie") String appCookie) {
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/HostsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/HostsWebResource.java
index aa60648..c3a1b51 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/HostsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/HostsWebResource.java
@@ -64,15 +64,15 @@
 public class HostsWebResource extends AbstractWebResource {
 
     @Context
-    UriInfo uriInfo;
-    public static final String HOST_NOT_FOUND = "Host is not found";
+    private UriInfo uriInfo;
+    private static final String HOST_NOT_FOUND = "Host is not found";
     private static final String[] REMOVAL_KEYS = {"mac", "vlan", "location", "ipAddresses"};
 
     /**
      * Get all end-station hosts.
      * Returns array of all known end-station hosts.
      *
-     * @return 200 OK
+     * @return 200 OK with array of all known end-station hosts.
      * @onos.rsModel Hosts
      */
     @GET
@@ -88,7 +88,7 @@
      * Returns detailed properties of the specified end-station host.
      *
      * @param id host identifier
-     * @return 200 OK
+     * @return 200 OK with detailed properties of the specified end-station host
      * @onos.rsModel Host
      */
     @GET
@@ -107,7 +107,7 @@
      *
      * @param mac  host MAC address
      * @param vlan host VLAN identifier
-     * @return 200 OK
+     * @return 200 OK with detailed properties of the specified end-station host
      * @onos.rsModel Host
      */
     @GET
@@ -160,11 +160,17 @@
                 .build();
     }
 
+    /**
+     * Internal host provider that provides host events.
+     */
     private final class InternalHostProvider implements HostProvider {
         private final ProviderId providerId =
                 new ProviderId("host", "org.onosproject.rest", true);
         private HostProviderService hostProviderService;
 
+        /**
+         * Prevents from instantiation.
+         */
         private InternalHostProvider() {
         }
 
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java
index 3199bcc..6fc5451 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java
@@ -58,18 +58,19 @@
 @Path("intents")
 public class IntentsWebResource extends AbstractWebResource {
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
     private static final Logger log = getLogger(IntentsWebResource.class);
     private static final int WITHDRAW_EVENT_TIMEOUT_SECONDS = 5;
 
-    public static final String INTENT_NOT_FOUND = "Intent is not found";
+    private static final String INTENT_NOT_FOUND = "Intent is not found";
 
     /**
-     * Get all intents.
+     * Gets all intents.
      * Returns array containing all the intents in the system.
+     *
+     * @return 200 OK with array of all the intents in the system
      * @onos.rsModel Intents
-     * @return array of all the intents in the system
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -80,12 +81,13 @@
     }
 
     /**
-     * Get intent by application and key.
+     * Gets intent by application and key.
      * Returns details of the specified intent.
-     * @onos.rsModel Intents
+     *
      * @param appId application identifier
      * @param key   intent key
-     * @return intent data
+     * @return 200 OK with intent data
+     * @onos.rsModel Intents
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -112,10 +114,19 @@
         return ok(root).build();
     }
 
-    class DeleteListener implements IntentListener {
+    /**
+     * Internal listener for tracking the intent deletion events.
+     */
+    private class DeleteListener implements IntentListener {
         final Key key;
         final CountDownLatch latch;
 
+        /**
+         * Default constructor.
+         *
+         * @param key   key
+         * @param latch count down latch
+         */
         DeleteListener(Key key, CountDownLatch latch) {
             this.key = key;
             this.latch = latch;
@@ -132,12 +143,13 @@
     }
 
     /**
-     * Submit a new intent.
+     * Submits a new intent.
      * Creates and submits intent from the JSON request.
-     * @onos.rsModel IntentHost
+     *
      * @param stream input JSON
      * @return status of the request - CREATED if the JSON is correct,
      * BAD_REQUEST if the JSON is invalid
+     * @onos.rsModel IntentHost
      */
     @POST
     @Consumes(MediaType.APPLICATION_JSON)
@@ -161,7 +173,7 @@
     }
 
     /**
-     * Withdraw intent.
+     * Withdraws intent.
      * Withdraws the specified intent from the system.
      *
      * @param appId application identifier
@@ -171,7 +183,7 @@
     @DELETE
     @Path("{appId}/{key}")
     public Response deleteIntentById(@PathParam("appId") String appId,
-                                 @PathParam("key") String key) {
+                                     @PathParam("key") String key) {
         final ApplicationId app = get(CoreService.class).getAppId(appId);
 
         Intent intent = get(IntentService.class).getIntent(Key.of(key, app));
@@ -216,5 +228,4 @@
         }
         return Response.noContent().build();
     }
-
 }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/LinksWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/LinksWebResource.java
index 5fad392..5e107f4 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/LinksWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/LinksWebResource.java
@@ -24,7 +24,9 @@
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import static org.onosproject.net.DeviceId.deviceId;
@@ -37,15 +39,16 @@
 public class LinksWebResource extends AbstractWebResource {
 
     /**
-     * Get infrastructure links.
+     * Gets infrastructure links.
      * Returns array of all links, or links for the specified device or port.
      * @onos.rsModel LinksGet
      * @param deviceId  (optional) device identifier
      * @param port      (optional) port number
      * @param direction (optional) direction qualifier
-     * @return 200 OK
+     * @return 200 OK with array of all links, or links for the specified device or port
      */
     @GET
+    @Produces(MediaType.APPLICATION_JSON)
     public Response getLinks(@QueryParam("device") String deviceId,
                              @QueryParam("port") String port,
                              @QueryParam("direction") String direction) {
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/MastershipWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/MastershipWebResource.java
index 99cc28c..dcbf394 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/MastershipWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/MastershipWebResource.java
@@ -65,7 +65,7 @@
      * Returns the role of the local node for the specified device.
      *
      * @param deviceId device identifier
-     * @return role of the current node
+     * @return 200 OK with role of the current node
      * @onos.rsModel MastershipRole
      */
     @GET
@@ -81,7 +81,7 @@
      * Returns the current master for a given device.
      *
      * @param deviceId device identifier
-     * @return the identifier of the master controller for the device
+     * @return 200 OK with the identifier of the master controller for the device
      * @onos.rsModel NodeId
      */
     @GET
@@ -101,7 +101,7 @@
      * preference. The first entry in the list is the current master.
      *
      * @param deviceId device identifier
-     * @return a list of controller identifiers
+     * @return 200 OK with a list of controller identifiers
      * @onos.rsModel RoleInfo
      */
     @GET
@@ -118,7 +118,7 @@
      * Returns the devices for which a controller is master.
      *
      * @param nodeId controller identifier
-     * @return a set of device identifiers
+     * @return 200 OK with a set of device identifiers
      * @onos.rsModel DeviceIds
      */
     @GET
@@ -141,7 +141,7 @@
      * device forcing master selection if necessary.
      *
      * @param deviceId device identifier
-     * @return the role of this controller instance
+     * @return 200 OK with the role of this controller instance
      * @onos.rsModel MastershipRole
      */
     @GET
@@ -160,7 +160,7 @@
      * for this device, no master selection will occur.
      *
      * @param deviceId device identifier
-     * @return status of the request
+     * @return status of the request - CREATED if the JSON is correct
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -181,7 +181,6 @@
      */
     @PUT
     @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
     public Response setRole(InputStream stream) {
 
         try {
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java
index 34a014f..ffb9149 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java
@@ -52,20 +52,20 @@
 public class MetersWebResource extends AbstractWebResource {
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
     private final Logger log = getLogger(getClass());
-    public static final String DEVICE_INVALID = "Invalid deviceId in meter creation request";
-    public static final String METER_NOT_FOUND = "Meter is not found for ";
+    private static final String DEVICE_INVALID = "Invalid deviceId in meter creation request";
+    private static final String METER_NOT_FOUND = "Meter is not found for ";
 
-    final MeterService meterService = get(MeterService.class);
-    final ObjectNode root = mapper().createObjectNode();
-    final ArrayNode metersNode = root.putArray("meters");
+    private final MeterService meterService = get(MeterService.class);
+    private final ObjectNode root = mapper().createObjectNode();
+    private final ArrayNode metersNode = root.putArray("meters");
 
     /**
      * Returns all meters of all devices.
      *
-     * @return array of all the meters in the system
+     * @return 200 OK with array of all the meters in the system
      * @onos.rsModel Meters
      */
     @GET
@@ -82,7 +82,7 @@
      * Returns a collection of meters by the device id.
      *
      * @param deviceId device identifier
-     * @return array of meters which belongs to specified device
+     * @return 200 OK with array of meters which belongs to specified device
      * @onos.rsModel Meters
      */
     @GET
@@ -102,7 +102,7 @@
      *
      * @param deviceId device identifier
      * @param meterId meter identifier
-     * @return a meter, return 404 if no entry has been found
+     * @return 200 OK with a meter, return 404 if no entry has been found
      * @onos.rsModel Meter
      */
     @GET
@@ -121,7 +121,7 @@
     }
 
     /**
-     * Create new meter rule. Creates and installs a new meter rule for the
+     * Creates new meter rule. Creates and installs a new meter rule for the
      * specified device.
      *
      * @param deviceId device identifier
@@ -182,7 +182,7 @@
     }
 
     /**
-     * Convert a meter instance to meterRequest instance with a certain operation.
+     * Converts a meter instance to meterRequest instance with a certain operation.
      *
      * @param meter     meter instance
      * @param operation operation
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/MetricsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/MetricsWebResource.java
index 930adc7..31f23dd 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/MetricsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/MetricsWebResource.java
@@ -44,14 +44,14 @@
 @Path("metrics")
 public class MetricsWebResource extends AbstractWebResource {
 
-    final MetricsService service = get(MetricsService.class);
-    final ObjectNode root = mapper().createObjectNode();
+    private final MetricsService service = get(MetricsService.class);
+    private final ObjectNode root = mapper().createObjectNode();
 
     /**
-     * Get stats information of all metrics. Returns array of all information for
+     * Gets stats information of all metrics. Returns array of all information for
      * all metrics.
      *
-     * @return metric information as array
+     * @return 200 OK with metric information as array
      * @onos.rsModel Metrics
      */
     @GET
@@ -69,11 +69,11 @@
     }
 
     /**
-     * Get stats information of a metric. Returns array of all information for the
+     * Gets stats information of a metric. Returns array of all information for the
      * specified metric.
      *
      * @param metricName metric name
-     * @return metric information as array
+     * @return 200 OK with metric information as array
      * @onos.rsModel Metric
      */
     @GET
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/MulticastRouteWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/MulticastRouteWebResource.java
index 2a3cd8d..974b74e 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/MulticastRouteWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/MulticastRouteWebResource.java
@@ -44,7 +44,7 @@
      * Get all multicast routes.
      * Returns array of all known multicast routes.
      *
-     * @return 200 OK
+     * @return 200 OK with array of all known multicast routes
      * @onos.rsModel McastRoutesGet
      */
     @GET
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/NetworkConfigWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/NetworkConfigWebResource.java
index 5c593a0..f11cc05 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/NetworkConfigWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/NetworkConfigWebResource.java
@@ -64,9 +64,9 @@
     }
 
     /**
-     * Get entire network configuration base.
+     * Gets entire network configuration base.
      *
-     * @return network configuration JSON
+     * @return 200 OK with network configuration JSON
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -83,10 +83,10 @@
     }
 
     /**
-     * Get all network configuration for a subject class.
+     * Gets all network configuration for a subject class.
      *
      * @param subjectClassKey subject class key
-     * @return network configuration JSON
+     * @return 200 OK with network configuration JSON
      */
     @GET
     @Path("{subjectClassKey}")
@@ -103,11 +103,11 @@
     }
 
     /**
-     * Get all network configuration for a subjectKey.
+     * Gets all network configuration for a subjectKey.
      *
      * @param subjectClassKey subjectKey class key
      * @param subjectKey      subjectKey key
-     * @return network configuration JSON
+     * @return 200 OK with network configuration JSON
      */
     @GET
     @Path("{subjectClassKey}/{subjectKey}")
@@ -127,12 +127,12 @@
     }
 
     /**
-     * Get specific network configuration for a subjectKey.
+     * Gets specific network configuration for a subjectKey.
      *
      * @param subjectClassKey subjectKey class key
      * @param subjectKey      subjectKey key
      * @param configKey       configuration class key
-     * @return network configuration JSON
+     * @return 200 OK with network configuration JSON
      */
     @GET
     @Path("{subjectClassKey}/{subjectKey}/{configKey}")
@@ -180,10 +180,10 @@
 
 
     /**
-     * Upload bulk network configuration.
+     * Uploads bulk network configuration.
      *
      * @param request network configuration JSON rooted at the top node
-     * @return empty response
+     * @return 200 OK
      * @throws IOException if unable to parse the request
      */
     @POST
@@ -203,7 +203,7 @@
      *
      * @param subjectClassKey subject class key
      * @param request         network configuration JSON rooted at the top node
-     * @return empty response
+     * @return 200 OK
      * @throws IOException if unable to parse the request
      */
     @POST
@@ -224,7 +224,7 @@
      * @param subjectClassKey subjectKey class key
      * @param subjectKey      subjectKey key
      * @param request         network configuration JSON rooted at the top node
-     * @return empty response
+     * @return 200 OK
      * @throws IOException if unable to parse the request
      */
     @POST
@@ -249,7 +249,7 @@
      * @param subjectKey      subjectKey key
      * @param configKey       configuration class key
      * @param request         network configuration JSON rooted at the top node
-     * @return empty response
+     * @return 200 OK
      * @throws IOException if unable to parse the request
      */
     @POST
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/PathsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/PathsWebResource.java
index 32ce923..5b1494b 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/PathsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/PathsWebResource.java
@@ -58,12 +58,12 @@
     }
 
     /**
-     * Get all shortest paths between any two hosts or devices.
+     * Gets all shortest paths between any two hosts or devices.
      * Returns array of all shortest paths between any two elements.
      * @onos.rsModel Paths
      * @param src source identifier
      * @param dst destination identifier
-     * @return path data
+     * @return 200 OK with array of all shortest paths between any two elements
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
@@ -77,12 +77,12 @@
     }
 
     /**
-     * Get all shortest disjoint paths between any two hosts or devices.
+     * Gets all shortest disjoint paths between any two hosts or devices.
      * Returns array of all shortest disjoint paths between any two elements.
      * @onos.rsModel Paths
      * @param src source identifier
      * @param dst destination identifier
-     * @return path data
+     * @return 200 OK with array of all shortest disjoint paths between any two elements
      */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/RegionsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/RegionsWebResource.java
index 20c080a..c17683c 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/RegionsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/RegionsWebResource.java
@@ -59,7 +59,7 @@
     /**
      * Returns set of all regions.
      *
-     * @return 200 OK
+     * @return 200 OK with set of all regions
      * @onos.rsModel Regions
      */
     @GET
@@ -73,7 +73,7 @@
      * Returns the region with the specified identifier.
      *
      * @param regionId region identifier
-     * @return 200 OK, 404 not found
+     * @return 200 OK with a region, 404 not found
      * @onos.rsModel Region
      */
     @GET
@@ -90,7 +90,7 @@
      * Returns the set of devices that belong to the specified region.
      *
      * @param regionId region identifier
-     * @return 200 OK
+     * @return 200 OK with set of devices that belong to the specified region
      * @onos.rsModel RegionDeviceIds
      */
     @GET
@@ -143,7 +143,6 @@
     @PUT
     @Path("{regionId}")
     @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
     public Response updateRegion(@PathParam("regionId") String regionId,
                                  InputStream stream) {
         try {
@@ -169,7 +168,7 @@
      * Removes the specified region using the given region identifier.
      *
      * @param regionId region identifier
-     * @return 200 OK, 404 not found
+     * @return 204 NO CONTENT
      */
     @DELETE
     @Path("{regionId}")
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/StatisticsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/StatisticsWebResource.java
index eb40a01..d878433 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/StatisticsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/StatisticsWebResource.java
@@ -56,14 +56,15 @@
 @Path("statistics")
 public class StatisticsWebResource  extends AbstractWebResource {
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
     /**
-     * Get load statistics for all links or for a specific link.
+     * Gets load statistics for all links or for a specific link.
+     *
      * @onos.rsModel StatisticsFlowsLink
      * @param deviceId (optional) device ID for a specific link
      * @param port (optional) port number for a specified link
-     * @return JSON encoded array lof Load objects
+     * @return 200 OK with JSON encoded array of Load objects
      */
     @GET
     @Path("flows/link")
@@ -101,9 +102,10 @@
     }
 
     /**
-     * Get table statistics for all tables of all devices.
+     * Gets table statistics for all tables of all devices.
+     *
      * @onos.rsModel StatisticsFlowsTables
-     * @return JSON encoded array of table statistics
+     * @return 200 OK with JSON encoded array of table statistics
      */
     @GET
     @Path("flows/tables")
@@ -130,10 +132,11 @@
     }
 
     /**
-     * Get table statistics for all tables of a specified device.
+     * Gets table statistics for all tables of a specified device.
+     *
      * @onos.rsModel StatisticsFlowsTables
      * @param deviceId device ID
-     * @return JSON encoded array of table statistics
+     * @return 200 OK with JSON encoded array of table statistics
      */
     @GET
     @Path("flows/tables/{deviceId}")
@@ -156,9 +159,9 @@
     }
 
     /**
-     * Get port statistics of all devices.
+     * Gets port statistics of all devices.
      * @onos.rsModel StatisticsPorts
-     * @return JSON encoded array of port statistics
+     * @return 200 OK with JSON encoded array of port statistics
      */
     @GET
     @Path("ports")
@@ -185,10 +188,10 @@
     }
 
     /**
-     * Get port statistics of a specified devices.
+     * Gets port statistics of a specified devices.
      * @onos.rsModel StatisticsPorts
      * @param deviceId device ID
-     * @return JSON encoded array of port statistics
+     * @return 200 OK with JSON encoded array of port statistics
      */
     @GET
     @Path("ports/{deviceId}")
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java
index 83c6c4d..c9062c7 100755
--- a/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/TenantWebResource.java
@@ -49,14 +49,14 @@
     private static final String INVALID_TENANTID = "Invalid tenant identifier ";
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
     private final VirtualNetworkAdminService vnetAdminService = get(VirtualNetworkAdminService.class);
 
     /**
-     * Returns all tenants.
+     * Returns all tenant identifiers.
      *
-     * @return 200 OK
+     * @return 200 OK with set of tenant identifiers
      * @onos.rsModel TenantIds
      */
     @GET
@@ -109,7 +109,7 @@
     }
 
     /**
-     * Get the tenant identifier from the JSON stream.
+     * Gets the tenant identifier from the JSON stream.
      *
      * @param stream TenantId JSON stream
      * @return TenantId
@@ -129,17 +129,16 @@
      * Get the matching tenant identifier from existing tenant identifiers in system.
      *
      * @param vnetAdminSvc virtual network administration service
-     * @param tidIn tenant identifier
+     * @param tidIn        tenant identifier
      * @return TenantId
      */
-     static TenantId getExistingTenantId(VirtualNetworkAdminService vnetAdminSvc,
-                                               TenantId tidIn) {
-        final TenantId resultTid = vnetAdminSvc
+    protected static TenantId getExistingTenantId(VirtualNetworkAdminService vnetAdminSvc,
+                                                TenantId tidIn) {
+        return vnetAdminSvc
                 .getTenantIds()
                 .stream()
                 .filter(tenantId -> tenantId.equals(tidIn))
                 .findFirst()
                 .orElseThrow(() -> new ItemNotFoundException(TENANTID_NOT_FOUND));
-        return resultTid;
     }
 }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/TopologyWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/TopologyWebResource.java
index 2675fbe..c01d94f 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/TopologyWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/TopologyWebResource.java
@@ -44,12 +44,12 @@
 @Path("topology")
 public class TopologyWebResource extends AbstractWebResource {
 
-    public static final String CLUSTER_NOT_FOUND = "Cluster is not found";
+    private static final String CLUSTER_NOT_FOUND = "Cluster is not found";
 
     /**
-     * Get overview of current topology.
+     * Gets overview of current topology.
      *
-     * @return topology overview
+     * @return 200 OK with topology overview
      * @onos.rsModel Topology
      */
     @GET
@@ -61,9 +61,9 @@
     }
 
     /**
-     * Get overview of topology SCCs.
+     * Gets overview of topology SCCs.
      *
-     * @return topology clusters overview
+     * @return 200 OK with topology clusters overview
      * @onos.rsModel TopologyClusters
      */
     @GET
@@ -78,10 +78,10 @@
     }
 
     /**
-     * Get details of a specific SCC.
+     * Gets details of a specific SCC.
      *
      * @param clusterId id of the cluster to query
-     * @return topology cluster details
+     * @return 200 OK with topology cluster details
      * @onos.rsModel TopologyCluster
      */
     @GET
@@ -102,10 +102,10 @@
     }
 
     /**
-     * Get devices in a specific SCC.
+     * Gets devices in a specific SCC.
      *
      * @param clusterId id of the cluster to query
-     * @return topology cluster devices
+     * @return 200 OK with topology cluster devices
      * @onos.rsModel TopologyClustersDevices
      */
     @GET
@@ -126,10 +126,10 @@
     }
 
     /**
-     * Get links in specific SCC.
+     * Gets links in specific SCC.
      *
      * @param clusterId id of the cluster to query
-     * @return topology cluster links
+     * @return 200 OK with topology cluster links
      * @onos.rsModel LinksGet
      */
     @GET
@@ -175,11 +175,11 @@
     }
 
     /**
-     * Test if a connect point is in broadcast set.
+     * Tests if a connect point is in broadcast set.
      *
      * @param connectPointString deviceid:portnumber
-     * @return JSON representation of true if the connect point is broadcast,
-     * false otherwise
+     * @return 200 OK with JSON representation of true if the connect point is
+     * broadcast, false otherwise
      * @onos.rsModel TopologyBroadcast
      */
     @GET
@@ -193,17 +193,16 @@
         ConnectPoint connectPoint = new ConnectPoint(deviceId, portNumber);
         boolean isBroadcast = get(TopologyService.class).isBroadcastPoint(topology, connectPoint);
 
-        return ok(mapper()
-                          .createObjectNode()
+        return ok(mapper().createObjectNode()
                           .put("broadcast", isBroadcast))
                 .build();
     }
 
     /**
-     * Test if a connect point is infrastructure or edge.
+     * Tests if a connect point is infrastructure or edge.
      *
      * @param connectPointString deviceid:portnumber
-     * @return JSON representation of true if the connect point is broadcast,
+     * @return 200 OK with JSON representation of true if the connect point is broadcast,
      * false otherwise
      * @onos.rsModel TopologyInfrastructure
      */
@@ -218,10 +217,8 @@
         ConnectPoint connectPoint = new ConnectPoint(deviceId, portNumber);
         boolean isInfrastructure = get(TopologyService.class).isInfrastructure(topology, connectPoint);
 
-        return ok(mapper()
-                          .createObjectNode()
+        return ok(mapper().createObjectNode()
                           .put("infrastructure", isInfrastructure))
                 .build();
     }
-
 }
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/VirtualNetworkWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/VirtualNetworkWebResource.java
index 252ca53..aaedb98 100755
--- a/web/api/src/main/java/org/onosproject/rest/resources/VirtualNetworkWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/VirtualNetworkWebResource.java
@@ -67,14 +67,14 @@
     private final VirtualNetworkService vnetService = get(VirtualNetworkService.class);
 
     @Context
-    UriInfo uriInfo;
+    private UriInfo uriInfo;
 
     // VirtualNetwork
 
     /**
      * Returns all virtual networks.
      *
-     * @return 200 OK
+     * @return 200 OK with set of virtual networks
      * @onos.rsModel VirtualNetworks
      */
     @GET
@@ -92,7 +92,7 @@
      * Returns the virtual networks with the specified tenant identifier.
      *
      * @param tenantId tenant identifier
-     * @return 200 OK, 404 not found
+     * @return 200 OK with a virtual network, 404 not found
      * @onos.rsModel VirtualNetworks
      */
     @GET
@@ -151,7 +151,7 @@
      * Returns all virtual network devices in a virtual network.
      *
      * @param networkId network identifier
-     * @return 200 OK
+     * @return 200 OK with set of virtual devices, 404 not found
      * @onos.rsModel VirtualDevices
      */
     @GET
@@ -222,7 +222,7 @@
      *
      * @param networkId network identifier
      * @param deviceId  virtual device identifier
-     * @return 200 OK
+     * @return 200 OK with set of virtual ports, 404 not found
      * @onos.rsModel VirtualPorts
      */
     @GET
@@ -312,7 +312,7 @@
      * Returns all virtual network links in a virtual network.
      *
      * @param networkId network identifier
-     * @return 200 OK
+     * @return 200 OK with set of virtual network links
      * @onos.rsModel VirtualLinks
      */
     @GET