diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest')
4 files changed, 18 insertions, 14 deletions
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 ff3257597c..8105af065e 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 020eb347d7..866fa885cc 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 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG @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, diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml index 90db5ea07d..8f2bcd6a81 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml @@ -5,7 +5,7 @@ <modelVersion>4.0.0</modelVersion> <dependencies> <dependency> - <groupId>io.swagger</groupId> + <groupId>io.swagger.core.v3</groupId> <artifactId>swagger-annotations</artifactId> <version>${swagger.version}</version> </dependency> @@ -21,4 +21,4 @@ <artifactId>item-permissions-rest-types</artifactId> -</project>
\ No newline at end of file +</project> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java index ee0f07abfd..873ff5d49e 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java @@ -20,7 +20,9 @@ package org.openecomp.sdcrests.itempermissions.types; -import io.swagger.annotations.ApiModel; + + +import io.swagger.v3.oas.annotations.media.Schema; import java.util.Set; @@ -28,7 +30,7 @@ import java.util.Set; * Created by ayalaben on 6/20/2017. */ -@ApiModel(value = "ItemPermissionsRequest") +@Schema(description = "ItemPermissionsRequest") public class ItemPermissionsRequestDto { private Set<String> addedUsersIds; |