Migrate swagger to openapi v3
Issue-ID: SDC-2261

Change-Id: I614c15878b9d165a4468570e8318867632c88434
Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml
index ff32575..8105af0 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml
@@ -34,7 +34,7 @@
             <version>${javax.inject.version}</version>
         </dependency>
         <dependency>
-            <groupId>io.swagger</groupId>
+            <groupId>io.swagger.core.v3</groupId>
             <artifactId>swagger-models</artifactId>
             <version>${swagger.version}</version>
         </dependency>
@@ -50,4 +50,4 @@
     </dependencies>
 
 
-</project>
\ No newline at end of file
+</project>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java
index 020eb34..866fa88 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java
@@ -21,8 +21,13 @@
 package org.openecomp.sdcrests.itempermissions.rest;
 
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
 import org.openecomp.sdcrests.itempermissions.types.ItemPermissionsDto;
 import org.openecomp.sdcrests.itempermissions.types.ItemPermissionsRequestDto;
 import org.springframework.validation.annotation.Validated;
@@ -42,22 +47,19 @@
 @Path("/v1.0/items/{itemId}/permissions")
 @Produces(MediaType.APPLICATION_JSON)
 @Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Item Permissions")
+@OpenAPIDefinition(info = @Info(title = "Item Permissions"))
 @Validated
 public interface ItemPermissions {
 
   @GET
   @Path("/")
-  @ApiOperation(value = "List users permissions assigned on item",
-      response = ItemPermissionsDto.class,
-      responseContainer = "List")
-
+  @Operation(description = "List users permissions assigned on item",responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ItemPermissionsDto.class)))))
   Response list(@PathParam("itemId") String itemId,
                 @HeaderParam(USER_ID_HEADER_PARAM) String user);
 
   @PUT
   @Path("/{permission}")
-  @ApiOperation(value = "Update useres permission on item")
+  @Operation(description = "Update useres permission on item")
   Response updatePermissions(@Valid ItemPermissionsRequestDto request,
                              @PathParam("itemId") String itemId,
                              @PathParam("permission") String permission,