diff options
author | Wojciech Sliwka <wojciech.sliwka@nokia.com> | 2019-07-03 08:38:28 +0200 |
---|---|---|
committer | Tomasz Golabek <tomasz.golabek@nokia.com> | 2019-07-23 11:33:02 +0000 |
commit | 38b3b95830568296bde457cd33f79277765f5704 (patch) | |
tree | 0dea07cbf7469f3c1f4b93d04510312ec86226e6 /openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest | |
parent | a73cbca41fbba96855173f39c89c04d50d4d8672 (diff) |
Migrate swagger to openapi v3
Issue-ID: SDC-2261
Change-Id: I614c15878b9d165a4468570e8318867632c88434
Signed-off-by: Wojciech Sliwka <wojciech.sliwka@nokia.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest')
3 files changed, 9 insertions, 7 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml index fc1adc6bbb..22b1b4cb88 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml @@ -88,7 +88,7 @@ </exclusions> </dependency> <dependency> - <groupId>io.swagger</groupId> + <groupId>io.swagger.core.v3</groupId> <artifactId>swagger-annotations</artifactId> <version>${swagger.version}</version> </dependency> 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); } |