Add Swagger comments and dependencies to appsm with REST APIs

ONOS-2704 and ONOS-2705

Change-Id: I77655af94f8b5aba647a94b3b786a6de8a285d7c
diff --git a/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java b/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java
index 384ff0f..257b42a 100644
--- a/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java
+++ b/src/main/java/org/onosproject/segmentrouting/web/PolicyWebResource.java
@@ -34,11 +34,20 @@
 import java.io.InputStream;
 import java.util.List;
 
+/**
+ * Query, create and remove segment routing plicies.
+ */
 @Path("policy")
 public class PolicyWebResource extends AbstractWebResource {
 
     private static final PolicyCodec POLICY_CODEC = new PolicyCodec();
 
+    /**
+     * Get all segment routing policies.
+     * Returns an array of segment routing policies.
+     *
+     * @return status of OK
+     */
     @GET
     @Produces(MediaType.APPLICATION_JSON)
     public Response getPolicy() {
@@ -50,6 +59,14 @@
         return ok(result.toString()).build();
     }
 
+    /**
+     * Create a new segment routing policy.
+     *
+     * @param input JSON stream for policy to create
+     * @return status of the request - OK if the policy is created,
+     * INTERNAL_SERVER_ERROR if the JSON is invalid or the policy cannot be created
+     * @throws IOException
+     */
     @POST
     @Consumes(MediaType.APPLICATION_JSON)
     public Response createPolicy(InputStream input) throws IOException {
@@ -66,6 +83,14 @@
         }
     }
 
+    /**
+     * Delete a segment routing policy.
+     *
+     * @param input JSON stream for policy to delete
+     * @return status of the request - OK if the policy is removed,
+     * INTERNAL_SERVER_ERROR otherwise
+     * @throws IOException if JSON is invalid
+     */
     @DELETE
     @Consumes(MediaType.APPLICATION_JSON)
     public Response removePolicy(InputStream input) throws IOException {