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 --- .../java/org/openecomp/sdcrests/validation/rest/Validation.java | 5 +++-- .../sdcrests/validation/rest/ValidationForSwaggerUsage.java | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java index a8dd245021..18da11561f 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java @@ -16,7 +16,8 @@ package org.openecomp.sdcrests.validation.rest; -import io.swagger.annotations.Api; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.springframework.validation.annotation.Validated; @@ -29,7 +30,7 @@ import java.io.InputStream; @Path("/v1.0/validation") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Api(value = "Validation") +@OpenAPIDefinition(info = @Info(title = ("Validation"))) @Validated public interface Validation { diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java index 68403a2696..76b0bad585 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java @@ -17,8 +17,9 @@ package org.openecomp.sdcrests.validation.rest; import com.sun.jersey.multipart.FormDataParam; -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 org.springframework.validation.annotation.Validated; import javax.ws.rs.*; @@ -30,7 +31,7 @@ import java.io.InputStream; @Path("/v1.0/validation") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Api(value = "Validation") +@OpenAPIDefinition(info = @Info(title="Validation")) @Validated public interface ValidationForSwaggerUsage { @@ -39,7 +40,7 @@ public interface ValidationForSwaggerUsage { @POST @Path("{type}/validate") @Consumes(MediaType.MULTIPART_FORM_DATA) - @ApiOperation(value = "Validate a package") + @Operation(description = "Validate a package") Response validateFile(@PathParam("type") String type, @FormDataParam("validate") InputStream fileToValidate); } -- cgit 1.2.3-korg