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 --- .../rest/VendorSoftwareProductsForSwaggerFileUpload.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProductsForSwaggerFileUpload.java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProductsForSwaggerFileUpload.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProductsForSwaggerFileUpload.java index eb70394b28..a2a7c8b453 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProductsForSwaggerFileUpload.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProductsForSwaggerFileUpload.java @@ -21,8 +21,12 @@ package org.openecomp.sdcrests.vsp.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 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.vendorsoftwareproducts.types.UploadFileResponseDto; import org.springframework.validation.annotation.Validated; @@ -38,7 +42,7 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG @Path("/v1.0/vendor-software-products") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Api(value = "Vendor Software Products") +@OpenAPIDefinition(info = @Info(title = "Vendor Software Products")) @Validated public interface VendorSoftwareProductsForSwaggerFileUpload { @@ -47,8 +51,7 @@ public interface VendorSoftwareProductsForSwaggerFileUpload { @POST @Path("/{vspId}/versions/{versionId}/orchestration-template-candidate") @Consumes(MediaType.MULTIPART_FORM_DATA) - @ApiOperation(value = "Uploads a HEAT package to translate", - response = UploadFileResponseDto.class) + @Operation(description = "Uploads a HEAT package to translate",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = UploadFileResponseDto.class)))) Response uploadOrchestrationTemplateCandidate(@PathParam("vspId") String vspId, @PathParam("versionId") String versionId, @FormDataParam("upload") -- cgit 1.2.3-korg