Add swagger.json to main/resources.
[aai/esr-server.git] / esr-mgr / src / main / java / org / onap / aai / esr / resource / ThirdpatySdncManager.java
index 18fd5d9..8660ade 100644 (file)
@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.SwaggerDefinition;
 
 import org.eclipse.jetty.http.HttpStatus;
 import org.onap.aai.esr.entity.rest.ThirdpartySdncRegisterInfo;
@@ -40,12 +41,14 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+@SwaggerDefinition
 @Path("/sdncontrollers")
 @Api(tags = {"ThirdParty sdnc Management     "})
 public class ThirdpatySdncManager {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(ThirdpatySdncManager.class);
 
+  private static ExtsysUtil extsysUtil = new ExtsysUtil();
   /**
    *query all thirdParty sdnc.
    */
@@ -122,8 +125,8 @@ public class ThirdpatySdncManager {
   @Timed
   public Response updateThirdpartySdnc(@ApiParam(value = "thirdpartySdnc", required = true) ThirdpartySdncRegisterInfo thirdPartySdnc,
       @ApiParam(value = "sdnc id", required = true) @PathParam("thirdPartySdncId") String thirdPartySdncId) {
-    LOGGER.info("start update sdnc .id:" + thirdPartySdncId + " info:" + ExtsysUtil.objectToString(thirdPartySdnc));
-    return ThirdpatySdncWrapper.getInstance().updateThirdpartySdnc(thirdPartySdnc);
+    LOGGER.info("start update sdnc .id:" + thirdPartySdncId + " info:" + extsysUtil.objectToString(thirdPartySdnc));
+    return ThirdpatySdncWrapper.getInstance().updateThirdpartySdnc(thirdPartySdnc, thirdPartySdncId);
   }
   
   /**
@@ -142,7 +145,7 @@ public class ThirdpatySdncManager {
           response = String.class)})
   @Timed
   public Response registerThirdpatySdnc(@ApiParam(value = "thirdPartySdnc", required = true) ThirdpartySdncRegisterInfo thirdPartySdnc) {
-    LOGGER.info("start register sdnc" + " info:" + ExtsysUtil.objectToString(thirdPartySdnc));
+    LOGGER.info("start register sdnc" + " info:" + extsysUtil.objectToString(thirdPartySdnc));
     return ThirdpatySdncWrapper.getInstance().registerThirdpartySdnc(thirdPartySdnc);
   }
 }