aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src
diff options
context:
space:
mode:
authorWojciech Sliwka <wojciech.sliwka@nokia.com>2019-07-03 08:38:28 +0200
committerTomasz Golabek <tomasz.golabek@nokia.com>2019-07-23 11:33:02 +0000
commit38b3b95830568296bde457cd33f79277765f5704 (patch)
tree0dea07cbf7469f3c1f4b93d04510312ec86226e6 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src
parenta73cbca41fbba96855173f39c89c04d50d4d8672 (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/vendor-software-products-rest/vendor-software-products-rest-services/src')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/ComponentDependencies.java52
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/ComponentMonitoringUploads.java42
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/ComponentProcesses.java103
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/Components.java79
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/Compute.java84
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/DeploymentFlavors.java54
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/Images.java100
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/Networks.java52
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/Nics.java83
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/OrchestrationTemplateCandidate.java41
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/Processes.java85
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VendorSoftwareProducts.java70
-rw-r--r--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.java13
13 files changed, 437 insertions, 421 deletions
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/ComponentDependencies.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/ComponentDependencies.java
index 54ac0737b3..2b467557a6 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/ComponentDependencies.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/ComponentDependencies.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.vendorsoftwareproducts.types.ComponentDependencyModel;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComponentDependencyResponseDto;
import org.springframework.validation.annotation.Validated;
@@ -39,60 +44,57 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/component-dependencies")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Component Dependencies")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product Component Dependencies"))
@Validated
public interface ComponentDependencies extends VspEntities {
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product component dependency")
+ @Operation( description= "Create a vendor software product component dependency")
Response create(@Valid ComponentDependencyModel request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/")
- @ApiOperation(value = "Get component dependencies for vendor software product",
- response = ComponentDependencyResponseDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId")
+ @Operation(description = "Get component dependencies for vendor software product", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = ComponentDependencyResponseDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId")
String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/{dependencyId}")
- @ApiOperation(value = "Delete component dependency for vendor software product")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id")
+ @Operation(description = "Delete component dependency for vendor software product")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id")
@PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product Component Dependency Id") @PathParam
+ @Parameter(description = "Vendor software product Component Dependency Id") @PathParam
("dependencyId") String dependencyId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{dependencyId}")
- @ApiOperation(value = "Update component dependency for vendor software product")
+ @Operation(description = "Update component dependency for vendor software product")
Response update(@Valid ComponentDependencyModel request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId")
String versionId,
- @ApiParam(value = "Vendor software product Component Dependency Id") @PathParam
+ @Parameter(description = "Vendor software product Component Dependency Id") @PathParam
("dependencyId") String dependencyId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{dependencyId}")
- @ApiOperation(value = "Get component dependency for vendor software product",
- response = ComponentDependencyResponseDto.class)
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product Component Dependency Id") @PathParam
+ @Operation(description = "Get component dependency for vendor software product", responses = @ApiResponse(content = @Content(schema = @Schema(implementation =ComponentDependencyResponseDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Component Dependency Id") @PathParam
("dependencyId") String dependencyId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
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/ComponentMonitoringUploads.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/ComponentMonitoringUploads.java
index 6bfc61bf39..1f883697ee 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/ComponentMonitoringUploads.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/ComponentMonitoringUploads.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.MonitoringUploadStatusDto;
@@ -40,44 +45,43 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
"/v1.0/vendor-software-products/{vspId}/versions/{versionId}/components/{componentId}/uploads/")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Component Uploads")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product Component Uploads"))
@Validated
public interface ComponentMonitoringUploads extends VspEntities {
@POST
@Path("types/{type}/")
@Consumes(MediaType.MULTIPART_FORM_DATA)
- @ApiOperation(value = "Upload file for component by type")
+ @Operation(description = "Upload file for component by type")
Response upload(@Multipart("upload") Attachment attachment,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId")
String vspId,
- @ApiParam(value = "Vendor software product version Id")
+ @Parameter(description = "Vendor software product version Id")
@PathParam("versionId") String versionId,
- @ApiParam(value = "Component Id") @PathParam("componentId") String
+ @Parameter(description = "Component Id") @PathParam("componentId") String
componentId,
- @ApiParam(value = "Upload Type") @PathParam("type") String type,
+ @Parameter(description = "Upload Type") @PathParam("type") String type,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user) throws Exception;
@DELETE
@Path("types/{type}")
- @ApiOperation(value = "Delete file uploaded for component")
+ @Operation(description = "Delete file uploaded for component")
Response delete(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId")
String versionId,
- @ApiParam(value = "Component Id") @PathParam("componentId") String componentId,
- @ApiParam(value = "Upload Type") @PathParam("type") String type,
+ @Parameter(description = "Component Id") @PathParam("componentId") String componentId,
+ @Parameter(description = "Upload Type") @PathParam("type") String type,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws Exception;
@GET
@Path("")
- @ApiOperation(value = "Get the filenames of uploaded files by type",
- response = MonitoringUploadStatusDto.class)
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId")
+ @Operation(description = "Get the filenames of uploaded files by type", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation =MonitoringUploadStatusDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId")
String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
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/ComponentProcesses.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/ComponentProcesses.java
index edb3b5bfc2..3bc68a7e53 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/ComponentProcesses.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/ComponentProcesses.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ProcessEntityDto;
@@ -35,83 +40,81 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import java.util.List;
+
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/components/{componentId}/processes")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Component Processes")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product Component Processes"))
@Validated
public interface ComponentProcesses extends VspEntities {
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product component processes",
- response = ProcessEntityDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "List vendor software product component processes", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProcessEntityDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/")
- @ApiOperation(value = "Delete vendor software product processes",
- responseContainer = "List")
+ @Operation(description = "Delete vendor software product processes",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = List.class))))
Response deleteList(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product process")
+ @Operation(description = "Create a vendor software product process")
Response create(@Valid ProcessRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{processId}")
- @ApiOperation(value = "Get vendor software product process",
- response = ProcessEntityDto.class)
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "Get vendor software product process",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ProcessEntityDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/{processId}")
- @ApiOperation(value = "Delete vendor software product process")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Operation(description = "Delete vendor software product process")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{processId}")
- @ApiOperation(value = "Update vendor software product process")
+ @Operation(description = "Update vendor software product process")
Response update(@Valid ProcessRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@@ -119,38 +122,38 @@ public interface ComponentProcesses extends VspEntities {
@GET
@Path("/{processId}/upload")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get vendor software product process uploaded file")
+ @Operation(description = "Get vendor software product process uploaded file")
Response getUploadedFile(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{processId}/upload")
- @ApiOperation(value = "Delete vendor software product process uploaded file")
+ @Operation(description = "Delete vendor software product process uploaded file")
Response deleteUploadedFile(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/{processId}/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
- @ApiOperation(value = "Update vendor software product process upload")
+ @Operation(description = "Update vendor software product process upload")
Response uploadFile(@Multipart("upload") Attachment attachment,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product process Id")
+ @Parameter(description = "Vendor software product process Id")
@PathParam("processId") String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
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/Components.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/Components.java
index b43dd4f099..18b81b3087 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/Components.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/Components.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.sdc.vendorsoftwareproduct.types.composition.ComponentData;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComponentDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComponentRequestDto;
@@ -36,96 +41,92 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import java.util.List;
+
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/components")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Components")
+@OpenAPIDefinition(info = @Info(title="Vendor Software Product Components"))
@Validated
public interface Components extends VspEntities {
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product components",
- response = ComponentDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "List vendor software product components", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ComponentDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/")
- @ApiOperation(value = "Delete vendor software product components",
- responseContainer = "List")
+ @Operation(description = "Delete vendor software product components", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = List.class))))
Response deleteList(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product component")
+ @Operation(description = "Create a vendor software product component")
Response create(@Valid ComponentRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{componentId}")
- @ApiOperation(value = "Get vendor software product component",
- response = ComponentData.class,
- responseContainer = "CompositionEntityResponse")
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Operation(description = "Get vendor software product component", responses = @ApiResponse(content = @Content(schema = @Schema(implementation =ComponentData.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/{componentId}")
- @ApiOperation(value = "Delete vendor software product component")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Operation(description = "Delete vendor software product component")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{componentId}")
- @ApiOperation(value = "Update vendor software product component")
+ @Operation(description = "Update vendor software product component")
Response update(@Valid ComponentRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{componentId}/questionnaire")
- @ApiOperation(value = "Get vendor software product component questionnaire",
- response = QuestionnaireResponseDto.class)
+ @Operation(description = "Get vendor software product component questionnaire",responses = @ApiResponse(content = @Content(schema = @Schema(implementation =QuestionnaireResponseDto.class))))
Response getQuestionnaire(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{componentId}/questionnaire")
- @ApiOperation(value = "Update vendor software product component questionnaire")
+ @Operation(description = "Update vendor software product component questionnaire")
Response updateQuestionnaire(@NotNull @IsValidJson String questionnaireData,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId")
String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId")
+ @Parameter(description = "Version Id") @PathParam("versionId")
String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
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/Compute.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/Compute.java
index 20209348a1..bf72b87219 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/Compute.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/Compute.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.vendorsoftwareproducts.types.ComputeDetailsDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ComputeDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto;
@@ -42,32 +47,28 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
"}/compute-flavors")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Component Compute-flavors")
+@OpenAPIDefinition(info = @Info(title= "Vendor Software Product Component Compute-flavors"))
@Validated
public interface Compute extends VspEntities {
@GET
@Path("/")
- @ApiOperation(value = "Get list of vendor software product component compute-flavors",
- response = ComputeDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "Get list of vendor software product component compute-flavors", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation =ComputeDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{computeFlavorId}")
- @ApiOperation(value = "Get vendor software product component compute-flavor",
- response = ComputeDetailsDto.class,
- responseContainer = "CompositionEntityResponse")
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "Get vendor software product component compute-flavor", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation =ComputeDetailsDto.class)))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product compute-flavor Id") @PathParam
+ @Parameter(description = "Vendor software product compute-flavor Id") @PathParam
("computeFlavorId")
String computeId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
@@ -75,24 +76,24 @@ public interface Compute extends VspEntities {
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product component compute-flavor")
+ @Operation(description = "Create a vendor software product component compute-flavor")
Response create(@Valid ComputeDetailsDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{computeFlavorId}")
- @ApiOperation(value = "Update vendor software product component compute-flavor")
+ @Operation(description = "Update vendor software product component compute-flavor")
Response update(@Valid ComputeDetailsDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product compute-flavor Id") @PathParam
+ @Parameter(description = "Vendor software product compute-flavor Id") @PathParam
("computeFlavorId")
String computeFlavorId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
@@ -100,13 +101,13 @@ public interface Compute extends VspEntities {
@PUT
@Path("/{computeFlavorId}/questionnaire")
- @ApiOperation(value = "Update vendor software product component compute-flavor questionnaire")
+ @Operation(description = "Update vendor software product component compute-flavor questionnaire")
Response updateQuestionnaire(@NotNull @IsValidJson String questionnaireData,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product compute-flavor Id") @PathParam
+ @Parameter(description = "Vendor software product compute-flavor Id") @PathParam
("computeFlavorId")
String computeFlavorId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
@@ -114,12 +115,12 @@ public interface Compute extends VspEntities {
@DELETE
@Path("/{computeFlavorId}")
- @ApiOperation(value = "Delete vendor software product component compute-flavor")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Operation(description = "Delete vendor software product component compute-flavor")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product compute-flavor Id") @PathParam
+ @Parameter(description = "Vendor software product compute-flavor Id") @PathParam
("computeFlavorId")
String computeFlavorId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
@@ -127,14 +128,13 @@ public interface Compute extends VspEntities {
@GET
@Path("/{computeFlavorId}/questionnaire")
- @ApiOperation(value = "Get vendor software product component compute-flavor questionnaire",
- response = QuestionnaireResponseDto.class)
+ @Operation(description = "Get vendor software product component compute-flavor questionnaire", responses = @ApiResponse(content = @Content(schema = @Schema(implementation =QuestionnaireResponseDto.class))))
Response getQuestionnaire(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product compute-flavor Id") @PathParam
+ @Parameter(description = "Vendor software product compute-flavor Id") @PathParam
("computeFlavorId") String computeId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
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/DeploymentFlavors.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/DeploymentFlavors.java
index d097b3f08b..a62f416be2 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/DeploymentFlavors.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/DeploymentFlavors.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.vendorsoftwareproducts.types.DeploymentFlavorDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.DeploymentFlavorListResponseDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.DeploymentFlavorRequestDto;
@@ -41,43 +46,40 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/deployment-flavors")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product deployment-flavors")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product deployment-flavors"))
@Validated
public interface DeploymentFlavors extends VspEntities {
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product Deployment Flavor")
+ @Operation(description = "Create a vendor software product Deployment Flavor")
Response create(@Valid DeploymentFlavorRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product Deployment Flavor",
- response = DeploymentFlavorListResponseDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "List vendor software product Deployment Flavor", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = DeploymentFlavorListResponseDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{deploymentFlavorId}")
- @ApiOperation(value = "Get vendor software product Deployment Flavor",
- response = DeploymentFlavorDto.class)
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product Deployment Flavor Id") @PathParam
+ @Operation(description = "Get vendor software product Deployment Flavor",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = DeploymentFlavorDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Deployment Flavor Id") @PathParam
("deploymentFlavorId") String deploymentFlavorId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/schema")
- Response getSchema(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String
+ Response getSchema(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String
vspId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
@@ -85,21 +87,21 @@ public interface DeploymentFlavors extends VspEntities {
@DELETE
@Path("/{deploymentFlavorId}")
- @ApiOperation(value = "Delete vendor software product Deployment Flavor")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product Deployment Flavor Id")
+ @Operation(description = "Delete vendor software product Deployment Flavor")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Deployment Flavor Id")
@PathParam("deploymentFlavorId") String deploymentFlavorId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{deploymentFlavorId}")
- @ApiOperation(value = "Update vendor software product Deployment Flavor")
+ @Operation(description = "Update vendor software product Deployment Flavor")
Response update(@Valid DeploymentFlavorRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product Deployment Flavor Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Deployment Flavor Id")
@PathParam("deploymentFlavorId") String deploymentFlavorId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
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/Images.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/Images.java
index 0e1375c3bb..4f7e1843e1 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/Images.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/Images.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.vendorsoftwareproducts.types.ImageDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ImageRequestDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto;
@@ -41,54 +46,52 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/components/{componentId}/images")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Images")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product Images"))
@Validated
public interface Images extends VspEntities {
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product component images",
- response = ImageDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "List vendor software product component images",responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ImageDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product component image")
+ @Operation(description = "Create a vendor software product component image")
Response create(@Valid ImageRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/schema")
- //@ApiOperation(value = "Get schema for vendor software product component Image" ,
+ //@Operation(description = "Get schema for vendor software product component Image" ,
// response = QuestionnaireResponseDto.class)
- Response getImageSchema(@ApiParam(value = "Vendor software product Id") @PathParam("vspId")
+ Response getImageSchema(@Parameter(description = "Vendor software product Id") @PathParam("vspId")
String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,@NotNull
(message = USER_MISSING_ERROR_MSG) @HeaderParam
(USER_ID_HEADER_PARAM) String user);
/*@GET
@Path("/{imageId}")
- @ApiOperation(value = "Get vendor software product component Image",
+ @Operation(description = "Get vendor software product component Image",
response = ImageDto.class,
responseContainer = "ImageEntityResponse")
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product image Id") @PathParam("imageId")
+ @Parameter(description = "Vendor software product image Id") @PathParam("imageId")
String imageId,
@Pattern(regexp = Version.VERSION_REGEX,
message = Version.VERSION_STRING_VIOLATION_MSG) @QueryParam("version")
@@ -98,14 +101,12 @@ public interface Images extends VspEntities {
@GET
@Path("/{imageId}")
- @ApiOperation(value = "Get vendor software product component Image",
- response = ImageDto.class,
- responseContainer = "CompositionEntityResponse")
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "Get vendor software product component Image",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ImageDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product Image Id") @PathParam
+ @Parameter(description = "Vendor software product Image Id") @PathParam
("imageId")
String imageId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
@@ -113,54 +114,53 @@ public interface Images extends VspEntities {
@DELETE
@Path("/{imageId}")
- @ApiOperation(value = "Delete vendor software product Image")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Operation(description = "Delete vendor software product Image")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product Image Id") @PathParam("imageId")
+ @Parameter(description = "Vendor software product Image Id") @PathParam("imageId")
String imageId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{imageId}")
- @ApiOperation(value = "Update vendor software product Image")
+ @Operation(description = "Update vendor software product Image")
Response update(@Valid ImageRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product Image Id") @PathParam("imageId")
+ @Parameter(description = "Vendor software product Image Id") @PathParam("imageId")
String imageId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{imageId}/questionnaire")
- @ApiOperation(value = "Update vendor software product component image questionnaire")
+ @Operation(description = "Update vendor software product component image questionnaire")
Response updateQuestionnaire(@NotNull @IsValidJson String questionnaireData,
- @ApiParam(value = "Vendor software product Id")
+ @Parameter(description = "Vendor software product Id")
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id")
+ @Parameter(description = "Version Id")
@PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product image Id")
+ @Parameter(description = "Vendor software product image Id")
@PathParam ("imageId") String imageId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{imageId}/questionnaire")
- @ApiOperation(value = "Get vendor software product component image questionnaire",
- response = QuestionnaireResponseDto.class)
+ @Operation(description = "Get vendor software product component image questionnaire", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = QuestionnaireResponseDto.class))))
Response getQuestionnaire(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product image Id") @PathParam
+ @Parameter(description = "Vendor software product image Id") @PathParam
("imageId") String imageId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
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/Networks.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/Networks.java
index 39be1d3927..a6c766c74d 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/Networks.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/Networks.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.vendorsoftwareproducts.types.NetworkDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.NetworkRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -39,56 +44,53 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/networks")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Networks")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product Networks"))
@Validated
public interface Networks extends VspEntities {
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product networks",
- response = NetworkDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "List vendor software product networks",responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = NetworkDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product network")
+ @Operation(description = "Create a vendor software product network")
Response create(@Valid NetworkRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{networkId}")
- @ApiOperation(value = "Get vendor software product network",
- response = NetworkDto.class)
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product network Id")
+ @Operation(description = "Get vendor software product network",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = NetworkDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product network Id")
@PathParam("networkId") String networkId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/{networkId}")
- @ApiOperation(value = "Delete vendor software product network")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product network Id") @PathParam("networkId")
+ @Operation(description = "Delete vendor software product network")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product network Id") @PathParam("networkId")
String networkId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{networkId}")
- @ApiOperation(value = "Update vendor software product network")
+ @Operation(description = "Update vendor software product network")
Response update(@Valid NetworkRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product network Id") @PathParam("networkId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product network Id") @PathParam("networkId")
String networkId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
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/Nics.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/Nics.java
index b7fc372014..0f56c4e5a9 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/Nics.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/Nics.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.vendorsoftwareproducts.types.NicDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.NicRequestDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto;
@@ -41,91 +46,87 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/components/{componentId}/nics")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Component NICs")
+@OpenAPIDefinition(info = @Info(title="Vendor Software Product Component NICs"))
@Validated
public interface Nics extends VspEntities {
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product component NICs",
- response = NicDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "List vendor software product component NICs",responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = NicDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product NIC")
+ @Operation(description = "Create a vendor software product NIC")
Response create(@Valid NicRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{nicId}")
- @ApiOperation(value = "Get vendor software product NIC",
- response = NicDto.class)
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Operation(description = "Get vendor software product NIC", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = NicDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product NIC Id") @PathParam("nicId") String nicId,
+ @Parameter(description = "Vendor software product NIC Id") @PathParam("nicId") String nicId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/{nicId}")
- @ApiOperation(value = "Delete vendor software product NIC")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Operation(description = "Delete vendor software product NIC")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product NIC Id") @PathParam("nicId")
+ @Parameter(description = "Vendor software product NIC Id") @PathParam("nicId")
String nicId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{nicId}")
- @ApiOperation(value = "Update vendor software product NIC")
+ @Operation(description = "Update vendor software product NIC")
Response update(@Valid NicRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product NIC Id") @PathParam("nicId")
+ @Parameter(description = "Vendor software product NIC Id") @PathParam("nicId")
String nicId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{nicId}/questionnaire")
- @ApiOperation(value = "Get vendor software product component NIC questionnaire",
- response = QuestionnaireResponseDto.class)
+ @Operation(description = "Get vendor software product component NIC questionnaire", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = QuestionnaireResponseDto.class))))
Response getQuestionnaire(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id") @PathParam("componentId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id") @PathParam("componentId")
String componentId,
- @ApiParam(value = "Vendor software product NIC Id") @PathParam("nicId") String nicId,
+ @Parameter(description = "Vendor software product NIC Id") @PathParam("nicId") String nicId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{nicId}/questionnaire")
- @ApiOperation(value = "Update vendor software product component NIC questionnaire")
+ @Operation(description = "Update vendor software product component NIC questionnaire")
Response updateQuestionnaire(@NotNull @IsValidJson String questionnaireData,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId")
String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product component Id")
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product component Id")
@PathParam("componentId") String componentId,
- @ApiParam(value = "Vendor software product NIC Id")
+ @Parameter(description = "Vendor software product NIC Id")
@PathParam("nicId") String nicId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
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/OrchestrationTemplateCandidate.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/OrchestrationTemplateCandidate.java
index ff7ad8a9db..60e269642e 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/OrchestrationTemplateCandidate.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/OrchestrationTemplateCandidate.java
@@ -16,9 +16,13 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.FileDataStructureDto;
@@ -40,7 +44,7 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/orchestration-template-candidate")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Orchestration Template Candidate")
+@OpenAPIDefinition(info = @Info(title = "Orchestration Template Candidate"))
@Validated
public interface OrchestrationTemplateCandidate extends VspEntities {
@@ -49,58 +53,55 @@ public interface OrchestrationTemplateCandidate extends VspEntities {
@Consumes(MediaType.MULTIPART_FORM_DATA)
Response upload(
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@Multipart("upload") Attachment fileToUpload,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get uploaded Network Package file",
- notes = "Downloads in uploaded Network Package file",
- response = File.class)
+ @Operation(description = "Get uploaded Network Package file",
+ summary = "Downloads in uploaded Network Package file", responses = @ApiResponse(content = @Content(schema = @Schema(implementation =File.class))))
Response get(
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws IOException;
@DELETE
@Path("/")
- @ApiOperation(value = "Delete orchestration template candidate file and its files data structure")
+ @Operation(description = "Delete orchestration template candidate file and its files data structure")
Response abort(
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId)
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId)
throws Exception;
@PUT
@Path("/process")
- @ApiOperation(value = "process Orchestration Template Candidate",
- response = UploadFileResponseDto.class)
+ @Operation(description = "process Orchestration Template Candidate",responses = @ApiResponse(content = @Content(schema = @Schema(implementation =UploadFileResponseDto.class))))
Response process(
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws InvocationTargetException, IllegalAccessException;
@PUT
@Path("/manifest")
- @ApiOperation(value = "Update an existing vendor software product")
+ @Operation(description = "Update an existing vendor software product")
Response updateFilesDataStructure(
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@Valid FileDataStructureDto fileDataStructureDto,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws Exception;
@GET
@Path("/manifest")
- @ApiOperation(value = "Get uploaded HEAT file files data structure",
- notes = "Downloads the latest HEAT package",
- response = FileDataStructureDto.class)
+ @Operation(description = "Get uploaded HEAT file files data structure",
+ summary = "Downloads the latest HEAT package",responses = @ApiResponse(content = @Content(schema = @Schema(implementation =FileDataStructureDto.class))))
Response getFilesDataStructure(
@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws Exception;
}
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/Processes.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/Processes.java
index 70388c42c1..f8af1536c5 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/Processes.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/Processes.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.ProcessEntityDto;
@@ -35,71 +40,69 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import java.util.List;
+
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/processes")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor Software Product Processes")
+@OpenAPIDefinition(info = @Info(title = "Vendor Software Product Processes"))
@Validated
public interface Processes {
@GET
@Path("/")
- @ApiOperation(value = "List vendor software product processes",
- response = ProcessEntityDto.class,
- responseContainer = "List")
- Response list(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "List vendor software product processes", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProcessEntityDto.class)))))
+ Response list(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/")
- @ApiOperation(value = "Delete vendor software product processes",
- responseContainer = "List")
+ @Operation(description = "Delete vendor software product processes", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = List.class))))
Response deleteList(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create a vendor software product process")
+ @Operation(description = "Create a vendor software product process")
Response create(@Valid ProcessRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@GET
@Path("/{processId}")
- @ApiOperation(value = "Get vendor software product process",
- response = ProcessEntityDto.class)
- Response get(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Operation(description = "Get vendor software product process", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ProcessEntityDto.class))))
+ Response get(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@DELETE
@Path("/{processId}")
- @ApiOperation(value = "Delete vendor software product process")
- Response delete(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Operation(description = "Delete vendor software product process")
+ Response delete(@Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{processId}")
- @ApiOperation(value = "Update vendor software product process")
+ @Operation(description = "Update vendor software product process")
Response update(@Valid ProcessRequestDto request,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
@@ -107,32 +110,32 @@ public interface Processes {
@GET
@Path("/{processId}/upload")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get vendor software product process uploaded file")
+ @Operation(description = "Get vendor software product process uploaded file")
Response getUploadedFile(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{processId}/upload")
- @ApiOperation(value = "Delete vendor software product process uploaded file")
+ @Operation(description = "Delete vendor software product process uploaded file")
Response deleteUploadedFile(
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product process Id") @PathParam("processId")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product process Id") @PathParam("processId")
String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/{processId}/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
- @ApiOperation(value = "Update vendor software product process upload")
+ @Operation(description = "Update vendor software product process upload")
Response uploadFile(@Multipart("upload") Attachment attachment,
- @ApiParam(value = "Vendor software product Id") @PathParam("vspId") String vspId,
- @ApiParam(value = "Vendor software product version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor software product process Id")
+ @Parameter(description = "Vendor software product Id") @PathParam("vspId") String vspId,
+ @Parameter(description = "Vendor software product version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor software product process Id")
@PathParam("processId") String processId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
String user);
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/VendorSoftwareProducts.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/VendorSoftwareProducts.java
index 635e7ed7bd..2b4147229d 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/VendorSoftwareProducts.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/VendorSoftwareProducts.java
@@ -17,9 +17,14 @@
package org.openecomp.sdcrests.vsp.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+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.item.types.ItemCreationDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.*;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.validation.IsValidJson;
@@ -32,6 +37,7 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.File;
import java.io.IOException;
+import java.util.List;
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
@@ -39,26 +45,24 @@ 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 VendorSoftwareProducts extends VspEntities {
@POST
@Path("/")
- @ApiOperation(value = "Create a new vendor software product",
- response = ItemCreationDto.class)
+ @Operation(description = "Create a new vendor software product",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ItemCreationDto.class))))
Response createVsp(@Valid VspRequestDto vspRequestDto,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/")
- @ApiOperation(value = "Get list of vendor software products and their description",
- responseContainer = "List")
- Response listVsps(@ApiParam(value = "Filter to return only Vendor Software Products with at" +
+ @Operation(description = "Get list of vendor software products and their description",responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = VspDetailsDto.class)))))
+ Response listVsps(@Parameter(description = "Filter to return only Vendor Software Products with at" +
" least one version at this status. Currently supported values: 'Certified' , 'Draft'")
@QueryParam("versionFilter") String versionStatus,
- @ApiParam(value = "Filter to only return Vendor Software Products at this status." +
+ @Parameter(description = "Filter to only return Vendor Software Products at this status." +
"Currently supported values: 'ACTIVE' , 'ARCHIVED'." +
"Default value = 'ACTIVE'.")
@QueryParam("Status") String itemStatus,
@@ -67,7 +71,7 @@ public interface VendorSoftwareProducts extends VspEntities {
@GET
@Path("/{vspId}/versions/{versionId}")
- @ApiOperation(value = "Get details of a vendor software product")
+ @Parameter(description = "Get details of a vendor software product")
Response getVsp(@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -75,7 +79,7 @@ public interface VendorSoftwareProducts extends VspEntities {
@PUT
@Path("/{vspId}/versions/{versionId}")
- @ApiOperation(value = "Update an existing vendor software product")
+ @Parameter(description = "Update an existing vendor software product")
Response updateVsp(@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@Valid VspDescriptionDto vspDescriptionDto,
@@ -84,30 +88,26 @@ public interface VendorSoftwareProducts extends VspEntities {
@DELETE
@Path("/{vspId}")
- @ApiOperation(value = "Deletes vendor software product by given id")
+ @Parameter(description = "Deletes vendor software product by given id")
Response deleteVsp(@PathParam("vspId") String vspId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/packages")
- @ApiOperation(value = "Get list of translated CSAR files details",
- response = PackageInfoDto.class,
- responseContainer = "List")
- Response listPackages(@ApiParam("Vendor Software Product status filter. " +
+ @Operation(description = "Get list of translated CSAR files details", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation=PackageInfoDto.class)))))
+ Response listPackages(@Parameter(description = "Vendor Software Product status filter. " +
"Currently supported values: 'ACTIVE', 'ARCHIVED'")
@QueryParam("Status") String status,
- @ApiParam("Category") @QueryParam("category") String category,
- @ApiParam("Sub-category") @QueryParam("subCategory") String subCategory,
+ @Parameter(description = "Category") @QueryParam("category") String category,
+ @Parameter(description = "Sub-category") @QueryParam("subCategory") String subCategory,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{vspId}/versions/{versionId}/orchestration-template")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get Orchestration Template (HEAT) file",
- notes = "Downloads the latest HEAT package",
- response = File.class)
+ @Operation(description = "Get Orchestration Template (HEAT) file", responses = @ApiResponse(content = @Content(schema = @Schema(implementation=File.class))))
Response getOrchestrationTemplate(
@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@@ -122,8 +122,8 @@ public interface VendorSoftwareProducts extends VspEntities {
@PUT
@Path("/{vspId}/versions/{versionId}/actions")
- @ApiOperation(value = "Actions on a vendor software product",
- notes = "Performs one of the following actions on a vendor software product: |"
+ @Operation(description = "Actions on a vendor software product",
+ summary = "Performs one of the following actions on a vendor software product: |"
+ "Checkout: Locks it for edits by other users. Only the locking user sees the edited "
+ "version.|"
+ "Undo_Checkout: Unlocks it and deletes the edits that were done.|"
@@ -140,17 +140,15 @@ public interface VendorSoftwareProducts extends VspEntities {
@GET
@Path("/packages/{vspId}")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get translated CSAR file",
- notes = "Exports translated file to a zip file",
- response = File.class)
+ @Operation(description = "Get translated CSAR file",
+ summary = "Exports translated file to a zip file", responses = @ApiResponse(content = @Content(schema = @Schema(implementation=File.class))))
Response getTranslatedFile(@PathParam("vspId") String vspId,
@QueryParam("versionId") String versionId,
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{vspId}/versions/{versionId}/questionnaire")
- @ApiOperation(value = "Get vendor software product questionnaire",
- response = QuestionnaireResponseDto.class)
+ @Operation(description = "Get vendor software product questionnaire", responses = @ApiResponse(content = @Content(schema = @Schema(implementation=QuestionnaireResponseDto.class))))
Response getQuestionnaire(@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -158,7 +156,7 @@ public interface VendorSoftwareProducts extends VspEntities {
@PUT
@Path("/{vspId}/versions/{versionId}/questionnaire")
- @ApiOperation(value = "Update vendor software product questionnaire")
+ @Operation(description = "Update vendor software product questionnaire")
Response updateQuestionnaire(@NotNull @IsValidJson String questionnaireData,
@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@@ -168,8 +166,7 @@ public interface VendorSoftwareProducts extends VspEntities {
@PUT
@Path("/{vspId}/versions/{versionId}/heal")
- @ApiOperation(value = "Checkout and heal vendor software product questionnaire",
- response = QuestionnaireResponseDto.class)
+ @Operation(description = "Checkout and heal vendor software product questionnaire",responses = @ApiResponse(content = @Content(schema = @Schema(implementation=QuestionnaireResponseDto.class))))
Response heal(@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -179,8 +176,7 @@ public interface VendorSoftwareProducts extends VspEntities {
@GET
@Path("/{vspId}/versions/{versionId}/vspInformationArtifact")
@Produces(MediaType.TEXT_PLAIN)
- @ApiOperation(value = "Get vendor software product information artifact for specified version",
- response = File.class)
+ @Operation(description = "Get vendor software product information artifact for specified version",responses = @ApiResponse(content = @Content(schema = @Schema(implementation=File.class))))
Response getVspInformationArtifact(@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -188,10 +184,8 @@ public interface VendorSoftwareProducts extends VspEntities {
@GET
@Path("/{vspId}/versions/{versionId}/compute-flavors")
- @ApiOperation(value = "Get list of vendor software product compute-flavors",
- response = VspComputeDto.class,
- responseContainer = "List")
- Response listComputes(@ApiParam(value = "Vendor software product Id")
+ @Operation(description = "Get list of vendor software product compute-flavors", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation=VspComputeDto.class)))))
+ Response listComputes(@Parameter(description = "Vendor software product Id")
@PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
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")