From 38b3b95830568296bde457cd33f79277765f5704 Mon Sep 17 00:00:00 2001 From: Wojciech Sliwka Date: Wed, 3 Jul 2019 08:38:28 +0200 Subject: Migrate swagger to openapi v3 Issue-ID: SDC-2261 Change-Id: I614c15878b9d165a4468570e8318867632c88434 Signed-off-by: Wojciech Sliwka --- .../org/openecomp/sdcrests/health/rest/HealthCheck.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java index 4be72a5999..b57cc9cc3e 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java @@ -20,8 +20,12 @@ package org.openecomp.sdcrests.health.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.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.openecomp.sdcrests.health.types.HealthInfoDtos; import org.springframework.validation.annotation.Validated; @@ -35,14 +39,12 @@ import javax.ws.rs.core.Response; @Path("/v1.0/healthcheck") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Api(value = "Health Check") +@OpenAPIDefinition(info = @Info(title = "Health Check")) @Validated public interface HealthCheck { @GET - @ApiOperation(value = "Perform health check", - response = HealthInfoDtos.class, - responseContainer = "List") + @Operation(description = "Perform health check", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = HealthInfoDtos.class)))) Response checkHealth(); } -- cgit 1.2.3-korg