aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be
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
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')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/Actions.java36
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/ActionsForSwaggerFileUpload.java11
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml2
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java24
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java44
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml2
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java14
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java18
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Items.java53
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Versions.java34
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/Notifications.java31
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml27
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java22
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java22
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml2
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java9
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPoolLimits.java58
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java110
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java46
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java46
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroupLimits.java58
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroups.java46
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/VendorLicenseModels.java46
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupEntityDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupModelDto.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupRequestDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupUpdateRequestDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementEntityDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementModelDto.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementRequestDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementUpdateRequestDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelEntityDto.java5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java6
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml2
-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
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDetailsDto.java4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/pom.xml2
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java33
-rw-r--r--openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml2
-rw-r--r--openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/pom.xml2
-rw-r--r--openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/TestErrorBody.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestCaseOutput.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml2
-rw-r--r--openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml2
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml2
67 files changed, 921 insertions, 855 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/Actions.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/Actions.java
index e22861ea72..eddac103c3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/Actions.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/Actions.java
@@ -20,11 +20,16 @@
package org.openecomp.sdcrests.action.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.openecomp.sdcrests.action.types.ActionResponseDto;
+import org.openecomp.sdcrests.action.types.ListResponseWrapper;
import org.springframework.validation.annotation.Validated;
import javax.servlet.http.HttpServletRequest;
@@ -39,7 +44,7 @@ import javax.ws.rs.core.Response;
@Path("/workflow/v1.0/actions")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Actions")
+@OpenAPIDefinition(info = @Info(title = "Actions"))
@Validated
public interface Actions {
@@ -52,7 +57,7 @@ public interface Actions {
*/
@GET
@Path("/{actionInvariantUuId}")
- @ApiOperation(value = "List Actions For Given Action Invariant UuId", responseContainer = "List")
+ @Operation(description = "List Actions For Given Action Invariant UuId", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ListResponseWrapper.class))))
Response getActionsByActionInvariantUuId(
@PathParam("actionInvariantUuId") String actionInvariantUuId,
@QueryParam("version") String actionUuId, @Context HttpServletRequest servletRequest);
@@ -64,10 +69,10 @@ public interface Actions {
* @return List Of Last Major and Last Minor of All Actions based on filter criteria
*/
@GET
- @ApiOperation(value = "List Filtered Actions ",
- notes = "Get list of actions based on a filter criteria | If no filter is sent all actions "
+ @Operation(description = "List Filtered Actions ",
+ summary = "Get list of actions based on a filter criteria | If no filter is sent all actions "
+ "will be returned",
- responseContainer = "List")
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ListResponseWrapper.class))))
Response getFilteredActions(@QueryParam("vendor") String vendor,
@QueryParam("category") String category,
@QueryParam("name") String name,
@@ -82,8 +87,7 @@ public interface Actions {
*/
@GET
@Path("/components")
- @ApiOperation(value = "List OPENECOMP Components supported by Action Library",
- responseContainer = "List")
+ @Operation(description = "List OPENECOMP Components supported by Action Library", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ListResponseWrapper.class))))
Response getOpenEcompComponents(@Context HttpServletRequest servletRequest);
/**
@@ -92,7 +96,7 @@ public interface Actions {
* @return Metadata object {@link ActionResponseDto ActionResponseDto} object for created Action
*/
@POST
- @ApiOperation(value = "Create a new Action")
+ @Operation(description = "Create a new Action")
Response createAction(String requestJson, @Context HttpServletRequest servletRequest);
/**
@@ -102,7 +106,7 @@ public interface Actions {
*/
@PUT
@Path("/{actionInvariantUuId}")
- @ApiOperation(value = "Update an existing action")
+ @Operation(description = "Update an existing action")
Response updateAction(@PathParam("actionInvariantUuId") String actionInvariantUuId,
String requestJson, @Context HttpServletRequest servletRequest);
@@ -115,7 +119,7 @@ public interface Actions {
*/
@DELETE
@Path("/{actionInvariantUuId}")
- @ApiOperation(value = "Delete Action")
+ @Operation(description = "Delete Action")
Response deleteAction(@PathParam("actionInvariantUuId") String actionInvariantUuId,
@Context HttpServletRequest servletRequest);
@@ -126,8 +130,8 @@ public interface Actions {
*/
@POST
@Path("/{actionInvariantUuId}")
- @ApiOperation(value = "Actions on a action",
- notes = "Performs one of the following actions on a action: |"
+ @Operation(description = "Actions on a action",
+ summary = "Performs one of the following actions on a action: |"
+ "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.|"
@@ -166,14 +170,14 @@ public interface Actions {
@GET
@Path("/{actionUuId}/artifacts/{artifactUuId}")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Downloads artifact for action")
+ @Operation(description = "Downloads artifact for action")
Response downloadArtifact(@PathParam("actionUuId") String actionUuId,
@PathParam("artifactUuId") String artifactUuId,
@Context HttpServletRequest servletRequest);
@DELETE
@Path("/{actionInvariantUuId}/artifacts/{artifactUuId}")
- @ApiOperation(value = "Delete Artifact")
+ @Operation(description = "Delete Artifact")
Response deleteArtifact(@PathParam("actionInvariantUuId") String actionInvariantUuId,
@PathParam("artifactUuId") String artifactUuId,
@Context HttpServletRequest servletRequest);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/ActionsForSwaggerFileUpload.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/ActionsForSwaggerFileUpload.java
index 8aedf15b1b..562b8bdcc9 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/ActionsForSwaggerFileUpload.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/ActionsForSwaggerFileUpload.java
@@ -21,8 +21,9 @@
package org.openecomp.sdcrests.action.rest;
import com.sun.jersey.multipart.FormDataParam;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.springframework.validation.annotation.Validated;
@@ -37,7 +38,7 @@ import java.io.InputStream;
@Path("/workflow/v1.0/actions")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Actions")
+@OpenAPIDefinition(info = @Info(title = "Actions"))
@Validated
public interface ActionsForSwaggerFileUpload {
@@ -57,7 +58,7 @@ public interface ActionsForSwaggerFileUpload {
*/
@POST
@Path("/{actionInvariantUuId}/artifacts")
- @ApiOperation(value = "Upload new Artifact")
+ @Operation(description = "Upload new Artifact")
@Consumes(MediaType.MULTIPART_FORM_DATA)
Response uploadArtifact(@PathParam("actionInvariantUuId") String actionInvariantUuId,
@Multipart(value = "artifactName", required = false) String artifactName,
@@ -76,7 +77,7 @@ public interface ActionsForSwaggerFileUpload {
@PUT
@Path("/{actionInvariantUuId}/artifacts/{artifactUuId}")
- @ApiOperation(value = "Update an existing artifact")
+ @Operation(description = "Update an existing artifact")
@Consumes(MediaType.MULTIPART_FORM_DATA)
Response updateArtifact(@PathParam("actionInvariantUuId") String actionInvariantUuId,
@PathParam("artifactUuId") String artifactUuId,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
index 3e8d8e9160..816bcb841a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/pom.xml
@@ -15,7 +15,7 @@
<dependencies>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
index 4da561eac4..c7f16bf18e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/application-config-rest/application-config-rest-services/src/main/java/org/openecomp/sdcrests/applicationconfig/rest/ApplicationConfiguration.java
@@ -20,43 +20,49 @@
package org.openecomp.sdcrests.applicationconfig.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.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.Multipart;
+import org.openecomp.sdcrests.applicationconfiguration.types.ApplicationConfigDto;
import org.openecomp.sdcrests.applicationconfiguration.types.ConfigurationDataDto;
+import org.openecomp.sdcrests.wrappers.GenericCollectionWrapper;
import org.springframework.validation.annotation.Validated;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.InputStream;
+import java.util.List;
@Path("/v1.0/application-configuration")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Application Configuration")
+@OpenAPIDefinition(info = @Info(title = "Application Configuration"))
@Validated
public interface ApplicationConfiguration {
@POST
@Path("/")
@Consumes(MediaType.MULTIPART_FORM_DATA)
- @ApiOperation(value = "Insert JSON schema into application config table")
+ @Operation(description = "Insert JSON schema into application config table")
Response insertToTable(@QueryParam("namespace") String namespace, @QueryParam("key") String key,
- @Multipart("value") InputStream fileContainingSchema);
+ @Multipart("description") InputStream fileContainingSchema);
@GET
@Path("/{namespace}/{key}")
- @ApiOperation(value = "Get JSON schema by namespace and key",
- response = ConfigurationDataDto.class)
+ @Operation(description = "Get JSON schema by namespace and key", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ConfigurationDataDto.class))))
Response getFromTable(@PathParam("namespace") String namespace, @PathParam("key") String key);
@GET
@Path("/{namespace}")
- @ApiOperation(value = "Get List of keys and values by namespace",
- responseContainer = "List")
+ @Operation(description = "Get List of keys and descriptions by namespace", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ApplicationConfigDto.class)))))
Response getListOfConfigurationByNamespaceFromTable(@PathParam("namespace") String namespace);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java
index 9440cfd395..6e6fade369 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/conflict-rest/conflict-rest-services/src/main/java/org/openecomp/sdcrests/conflict/rest/Conflicts.java
@@ -20,9 +20,13 @@
package org.openecomp.sdcrests.conflict.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.openecomp.sdcrests.common.RestConstants;
import org.openecomp.sdcrests.conflict.types.ConflictDto;
import org.openecomp.sdcrests.conflict.types.ConflictResolutionDto;
@@ -37,39 +41,39 @@ import javax.ws.rs.core.Response;
@Path("/v1.0/items/{itemId}/versions/{versionId}/conflicts")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Item Version Conflicts")
+@OpenAPIDefinition(info = @Info(title = "Item Version Conflicts"))
@Validated
public interface Conflicts {
@GET
@Path("/")
- @ApiOperation(value = "item version conflicts",
- notes = "Item version private copy conflicts against its public copy",
- response = ItemVersionConflictDto.class)
- Response getConflict(@ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "item version conflicts",
+ summary = "Item version private copy conflicts against its public copy",
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ItemVersionConflictDto.class))))
+ Response getConflict(@Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = RestConstants.USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{conflictId}")
- @ApiOperation(value = "Gets item version conflict",
- notes = "Gets an item version private copy conflict against its public copy",
- response = ConflictDto.class)
- Response getConflict(@ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
- @ApiParam("Version Id") @PathParam("conflictId") String conflictId,
+ @Operation(description = "Gets item version conflict",
+ summary = "Gets an item version private copy conflict against its public copy",
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = ConflictDto.class))))
+ Response getConflict(@Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("conflictId") String conflictId,
@NotNull(message = RestConstants.USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{conflictId}")
- @ApiOperation(value = "Resolves item version conflict",
- notes = "Resolves an item version private copy conflict against its public copy")
+ @Operation(description = "Resolves item version conflict",
+ summary = "Resolves an item version private copy conflict against its public copy")
Response resolveConflict(ConflictResolutionDto conflictResolution,
- @ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
- @ApiParam("Version Id") @PathParam("conflictId") String conflictId,
+ @Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("conflictId") String conflictId,
@NotNull(message = RestConstants.USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml
index 72f5f973a9..ebab2e41fe 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml
@@ -88,7 +88,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java
index 21cab55dc0..c25456f1ae 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/src/main/java/org/openecomp/sdcrests/externaltesting/rest/ExternalTesting.java
@@ -16,7 +16,8 @@
package org.openecomp.sdcrests.externaltesting.rest;
-import io.swagger.annotations.Api;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.info.Info;
import org.openecomp.core.externaltesting.api.ClientConfiguration;
import org.openecomp.core.externaltesting.api.RemoteTestingEndpointDefinition;
import org.openecomp.core.externaltesting.api.VtpTestExecutionRequest;
@@ -31,7 +32,7 @@ import java.util.List;
@Path("/v1.0/externaltesting")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "External-Testing")
+@OpenAPIDefinition(info = @Info(title = "External-Testing"))
@Validated
public interface ExternalTesting {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java
index 4be72a5999..b57cc9cc3e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/HealthCheck.java
@@ -20,8 +20,12 @@
package org.openecomp.sdcrests.health.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.openecomp.sdcrests.health.types.HealthInfoDtos;
import org.springframework.validation.annotation.Validated;
@@ -35,14 +39,12 @@ import javax.ws.rs.core.Response;
@Path("/v1.0/healthcheck")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Health Check")
+@OpenAPIDefinition(info = @Info(title = "Health Check"))
@Validated
public interface HealthCheck {
@GET
- @ApiOperation(value = "Perform health check",
- response = HealthInfoDtos.class,
- responseContainer = "List")
+ @Operation(description = "Perform health check", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = HealthInfoDtos.class))))
Response checkHealth();
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml
index ff3257597c..8105af065e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/pom.xml
@@ -34,7 +34,7 @@
<version>${javax.inject.version}</version>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger.version}</version>
</dependency>
@@ -50,4 +50,4 @@
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java
index 020eb347d7..866fa885cc 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-services/src/main/java/org/openecomp/sdcrests/itempermissions/rest/ItemPermissions.java
@@ -21,8 +21,13 @@
package org.openecomp.sdcrests.itempermissions.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.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.itempermissions.types.ItemPermissionsDto;
import org.openecomp.sdcrests.itempermissions.types.ItemPermissionsRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -42,22 +47,19 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/items/{itemId}/permissions")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Item Permissions")
+@OpenAPIDefinition(info = @Info(title = "Item Permissions"))
@Validated
public interface ItemPermissions {
@GET
@Path("/")
- @ApiOperation(value = "List users permissions assigned on item",
- response = ItemPermissionsDto.class,
- responseContainer = "List")
-
+ @Operation(description = "List users permissions assigned on item",responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = ItemPermissionsDto.class)))))
Response list(@PathParam("itemId") String itemId,
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{permission}")
- @ApiOperation(value = "Update useres permission on item")
+ @Operation(description = "Update useres permission on item")
Response updatePermissions(@Valid ItemPermissionsRequestDto request,
@PathParam("itemId") String itemId,
@PathParam("permission") String permission,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml
index 90db5ea07d..8f2bcd6a81 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/pom.xml
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
@@ -21,4 +21,4 @@
<artifactId>item-permissions-rest-types</artifactId>
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java
index ee0f07abfd..873ff5d49e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-permissions-rest/item-permissions-rest-types/src/main/java/org/openecomp/sdcrests/itempermissions/types/ItemPermissionsRequestDto.java
@@ -20,7 +20,9 @@
package org.openecomp.sdcrests.itempermissions.types;
-import io.swagger.annotations.ApiModel;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
@@ -28,7 +30,7 @@ import java.util.Set;
* Created by ayalaben on 6/20/2017.
*/
-@ApiModel(value = "ItemPermissionsRequest")
+@Schema(description = "ItemPermissionsRequest")
public class ItemPermissionsRequestDto {
private Set<String> addedUsersIds;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Items.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Items.java
index 942bc59495..a916f8df55 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Items.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Items.java
@@ -15,9 +15,15 @@
*/
package org.openecomp.sdcrests.item.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.versioning.types.Item;
import org.openecomp.sdcrests.item.types.ItemActionRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -26,50 +32,47 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+
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/items")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Items")
+@OpenAPIDefinition(info = @Info(title = "Items"))
@Validated
public interface Items {
@GET
@Path("/")
- @ApiOperation(value = "Get list of items according to desired filters",
- responseContainer = "List")
- Response list(@ApiParam(value = "Filter by item status", allowableValues = "ACTIVE,ARCHIVED")
+ @Operation(description = "Get list of items according to desired filters", responses = @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = Item.class)))))
+ Response list(@Parameter(description = "Filter by item status", schema = @Schema(type = "string", allowableValues = {"ACTIVE", "ARCHIVED"}))
@QueryParam("itemStatus") String itemStatusFilter,
- @ApiParam(value = "Filter by version status" , allowableValues = "Certified,Draft")
+ @Parameter(description = "Filter by version status", schema = @Schema(type = "string", allowableValues = {"Certified", "Draft"}))
@QueryParam("versionStatus") String versionStatusFilter,
- @ApiParam(value = "Filter by item type" , allowableValues = "vsp,vlm")
+ @Parameter(description = "Filter by item type", schema = @Schema(type = "string", allowableValues = {"vsp", "vlm"}))
@QueryParam("itemType") String itemTypeFilter,
- @ApiParam(value = "Filter by user permission" , allowableValues = "Owner,Contributor")
+ @Parameter(description = "Filter by user permission", schema = @Schema(type = "string", allowableValues = {"Owner", "Contributor"}))
@QueryParam("permission") String permissionFilter,
- @ApiParam(value = "Filter by onboarding method" , allowableValues = "NetworkPackage,Manual")
+ @Parameter(description = "Filter by onboarding method", schema = @Schema(type = "string", allowableValues = {"NetworkPackage", "manual"}))
@QueryParam("onboardingMethod") String onboardingMethodFilter,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
- @GET
- @Path("/{itemId}")
- @ApiOperation(value = "Get details of a item")
- Response getItem(@PathParam("itemId") String itemId,
+ @GET
+ @Path("/{itemId}")
+ @Operation(description = "Get details of a item")
+ Response getItem(@PathParam("itemId") String itemId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
- @PUT
- @Path("/{itemId}/actions")
- @ApiOperation(value = "Acts on item version")
- Response actOn(ItemActionRequestDto request,
- @PathParam("itemId") String itemId,
- @NotNull(message = USER_MISSING_ERROR_MSG)
- @HeaderParam(USER_ID_HEADER_PARAM) String user);
-
-
-
+ @PUT
+ @Path("/{itemId}/actions")
+ @Operation(description = "Acts on item version")
+ Response actOn(ItemActionRequestDto request,
+ @PathParam("itemId") String itemId,
+ @NotNull(message = USER_MISSING_ERROR_MSG)
+ @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Versions.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Versions.java
index 73c224c6ef..6f72175175 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Versions.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/Versions.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.item.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.*;
import org.springframework.validation.annotation.Validated;
@@ -37,22 +42,20 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/items/{itemId}/versions")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Item Versions")
+@OpenAPIDefinition(info = @Info(title = "Item Versions"))
@Validated
public interface Versions {
@GET
@Path("/")
- @ApiOperation(value = "Lists item versions",
- response = VersionDto.class,
- responseContainer = "List")
+ @Operation(description = "Lists item versions", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = VersionDto.class)))))
Response list(@PathParam("itemId") String itemId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/{versionId}")
- @ApiOperation(value = "Creates a new item version")
+ @Operation(description = "Creates a new item version")
Response create(VersionRequestDto request,
@PathParam("itemId") String itemId,
@PathParam("versionId") String versionId,
@@ -61,7 +64,7 @@ public interface Versions {
@GET
@Path("/{versionId}")
- @ApiOperation(value = "Gets item version", response = VersionDto.class)
+ @Operation(description = "Gets item version", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = VersionDto.class))))
Response get(@PathParam("itemId") String itemId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -69,18 +72,15 @@ public interface Versions {
@GET
@Path("/{versionId}/activity-logs")
- @ApiOperation(value = "Gets item version activity log",
- response = ActivityLogDto.class,
- responseContainer = "List")
- Response getActivityLog(@ApiParam("Item Id") @PathParam("itemId") String itemId,
- @ApiParam("Version Id") @PathParam("versionId") String versionId,
+ @Operation(description = "Gets item version activity log", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = ActivityLogDto.class)))))
+ Response getActivityLog(@Parameter(description = "Item Id") @PathParam("itemId") String itemId,
+ @Parameter( description = "Version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{versionId}/revisions")
- @ApiOperation(value = "Gets item version revisions", response = RevisionDto.class,
- responseContainer = "List")
+ @Operation(description = "Gets item version revisions", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = ActivityLogDto.class)))))
Response listRevisions(@PathParam("itemId") String itemId,
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -88,7 +88,7 @@ public interface Versions {
@PUT
@Path("/{versionId}/actions")
- @ApiOperation(value = "Acts on item version")
+ @Operation(description = "Acts on item version")
Response actOn(VersionActionRequestDto request,
@PathParam("itemId") String itemId,
@PathParam("versionId") String versionId,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/Notifications.java b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/Notifications.java
index 5420bda5c0..0f6b7c9c8e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/Notifications.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/Notifications.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.notifications.rest.services;
-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.notifications.types.NotificationsStatusDto;
import org.openecomp.sdcrests.notifications.types.UpdateNotificationResponseStatus;
import org.springframework.validation.annotation.Validated;
@@ -39,16 +44,14 @@ import static org.openecomp.sdcrests.common.RestConstants.*;
@Path("/v1.0/notifications")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Notifications")
+@OpenAPIDefinition(info = @Info(title = "Notifications"))
@Validated
public interface Notifications {
String LIMIT_QUERY_PARAM = "NOTIFICATION_ROWS_LIMIT";
String END_OF_PAGE_QUERY_PARAM = "END_OF_PAGE_EVENT_ID";
@GET
- @ApiOperation(value = "Retrive all user notifications",
- response = NotificationsStatusDto.class,
- responseContainer = "List")
+ @Operation(description = "Retrieve all user notifications", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = NotificationsStatusDto.class)))))
Response getNotifications(
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user,
@QueryParam(LAST_DELIVERED_QUERY_PARAM) UUID lastDelvered,
@@ -56,27 +59,23 @@ public interface Notifications {
@PUT
@Path("/{notificationId}")
- @ApiOperation(value = "Mark notification as read",
- response = UpdateNotificationResponseStatus.class)
+ @Operation(description = "Mark notification as read", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = UpdateNotificationResponseStatus.class))))
Response markAsRead(
- @ApiParam(value = "Notification Id") @PathParam("notificationId") String notificationId,
+ @Parameter(description = "Notification Id") @PathParam("notificationId") String notificationId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws InvocationTargetException, IllegalAccessException;
@PUT
@Path("/last-seen/{notificationId}")
- @ApiOperation(value = "Update Last Seen Notification",
- response = UpdateNotificationResponseStatus.class)
+ @Operation(description = "Update Last Seen Notification", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = UpdateNotificationResponseStatus.class))))
Response updateLastSeenNotification(
- @ApiParam(value = "Notification Id") @PathParam("notificationId") String notificationId,
+ @Parameter(description = "Notification Id") @PathParam("notificationId") String notificationId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user)
throws InvocationTargetException, IllegalAccessException;
@GET
@Path("/worker")
- @ApiOperation(value = "Retrive user not delivered notifications",
- response = NotificationsStatusDto.class,
- responseContainer = "List")
+ @Operation(description = "Retrive user not delivered notifications",responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = NotificationsStatusDto.class)))))
Response getNewNotificationsByOwnerId(
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user,
@QueryParam(LAST_DELIVERED_QUERY_PARAM) String eventId,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml
index 52799f76a5..469746b174 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml
@@ -244,34 +244,19 @@
</executions>
</plugin>
<plugin>
- <groupId>com.github.kongchen</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
- <version>${mvn.swagger.version}</version>
+ <version>2.0.8</version>
<configuration>
- <apiSources>
- <apiSource>
- <springmvc>false</springmvc>
- <locations>org.openecomp.sdcrests</locations>
- <schemes>http</schemes>
- <basePath>/onboarding-api</basePath>
- <info>
- <title>Rest API</title>
- <version>v1.0, build #${buildNumber}</version>
- <description>Rest API Documentation</description>
- <termsOfService>
- http://www.github.com/kongchen/swagger-maven-plugin
- </termsOfService>
- </info>
- <swaggerDirectory>${basedir}/target/generated/swagger-ui
- </swaggerDirectory>
- </apiSource>
- </apiSources>
+ <outputPath>${project.build.directory}/generated/swagger-ui</outputPath>
+ <outputFileName>swagger</outputFileName>
+ <outputFormat>JSON</outputFormat>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
- <goal>generate</goal>
+ <goal>resolve</goal>
</goals>
</execution>
</executions>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml
index 177f32d8f8..e3ed195db8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/pom.xml
@@ -56,7 +56,7 @@
</dependency>
<!-- Swagger -->
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-core</artifactId>
<version>${swagger.version}</version>
<scope>compile</scope>
@@ -79,4 +79,4 @@
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java
index 2ce159a6fd..fb71761009 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java
@@ -16,8 +16,13 @@
package org.openecomp.sdcrests.togglz.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.media.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.togglz.types.FeatureDto;
import org.openecomp.sdcrests.togglz.types.FeatureSetDto;
import org.springframework.validation.annotation.Validated;
@@ -30,31 +35,28 @@ import javax.ws.rs.core.Response;
@Path("/v1.0/togglz")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Togglz")
+@OpenAPIDefinition(info = @Info(title = "Togglz"))
@Validated
public interface TogglzFeatures {
@GET
- @ApiOperation(value = "Get TOGGLZ Features",
- response = FeatureSetDto.class,
- responseContainer = "List")
+ @Operation(description = "Get TOGGLZ Features", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = FeatureSetDto.class)))))
Response getFeatures();
@PUT
@Path("/state/{state}")
- @ApiOperation(value = "Update feature toggle state for all features")
+ @Operation(description = "Update feature toggle state for all features")
Response setAllFeatures(@PathParam("state") boolean state);
@PUT
@Path("/{featureName}/state/{state}")
- @ApiOperation(value = "Update feature toggle state")
+ @Operation(description = "Update feature toggle state")
Response setFeatureState(@PathParam("featureName") String featureName, @PathParam("state") boolean state);
@GET
@Path("/{featureName}/state")
- @ApiOperation(value = "Get feature toggle state",
- response = FeatureDto.class)
+ @Operation(description = "Get feature toggle state", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = FeatureDto.class))))
Response getFeatureState(@PathParam("featureName") String featureName);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java b/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java
index 73c7c7729d..fac7e7698a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/unique-type-rest/unique-type-rest-services/src/main/java/org/openecomp/sdcrests/uniquevalue/rest/UniqueTypes.java
@@ -15,7 +15,12 @@
*/
package org.openecomp.sdcrests.uniquevalue.rest;
-import io.swagger.annotations.*;
+
+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.responses.ApiResponse;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotNull;
@@ -29,24 +34,23 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/unique-types")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Unique Types")
+@OpenAPIDefinition(info = @Info(title = "Unique Types"))
@Validated
public interface UniqueTypes {
@GET
@Path("/")
- @ApiOperation(value = "Lists unique value types")
+ @Operation(description = "Lists unique value types")
Response listUniqueTypes(@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{type}/values/{value}")
- @ApiOperation(value = "Gets unique value")
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "Indication whether the unique value is occupied"),
- @ApiResponse(code = 404, message = "Unsupported unique type")})
+ @Operation(description = "Gets unique value")
+ @ApiResponse(responseCode = "200", description = "Indication whether the unique value is occupied")
+ @ApiResponse(responseCode = "404", description = "Unsupported unique type")
Response getUniqueValue(
- @ApiParam("The unique value type, for example: 'VlmName'") @PathParam("type") String type,
- @ApiParam("The unique value") @PathParam("value") String value,
+ @Parameter(description = "The unique value type, for example: 'VlmName'") @PathParam("type") String type,
+ @Parameter(description = "The unique value") @PathParam("value") String value,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml
index fc1adc6bbb..22b1b4cb88 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml
@@ -88,7 +88,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java
index a8dd245021..18da11561f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/Validation.java
@@ -16,7 +16,8 @@
package org.openecomp.sdcrests.validation.rest;
-import io.swagger.annotations.Api;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.info.Info;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.springframework.validation.annotation.Validated;
@@ -29,7 +30,7 @@ import java.io.InputStream;
@Path("/v1.0/validation")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Validation")
+@OpenAPIDefinition(info = @Info(title = ("Validation")))
@Validated
public interface Validation {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java
index 68403a2696..76b0bad585 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/src/main/java/org/openecomp/sdcrests/validation/rest/ValidationForSwaggerUsage.java
@@ -17,8 +17,9 @@
package org.openecomp.sdcrests.validation.rest;
import com.sun.jersey.multipart.FormDataParam;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.info.Info;
import org.springframework.validation.annotation.Validated;
import javax.ws.rs.*;
@@ -30,7 +31,7 @@ import java.io.InputStream;
@Path("/v1.0/validation")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Validation")
+@OpenAPIDefinition(info = @Info(title="Validation"))
@Validated
public interface ValidationForSwaggerUsage {
@@ -39,7 +40,7 @@ public interface ValidationForSwaggerUsage {
@POST
@Path("{type}/validate")
@Consumes(MediaType.MULTIPART_FORM_DATA)
- @ApiOperation(value = "Validate a package")
+ @Operation(description = "Validate a package")
Response validateFile(@PathParam("type") String type,
@FormDataParam("validate") InputStream fileToValidate);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPoolLimits.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPoolLimits.java
index 740fdfcc3b..83395c8c9d 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPoolLimits.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPoolLimits.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.vendorlicense.types.LimitEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -40,20 +45,20 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
"/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/entitlement-pools/{entitlementPoolId}/limits")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - Entitlement Pool Limits")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - Entitlement Pool Limits"))
@Validated
public interface EntitlementPoolLimits {
@POST
@Path("/")
- @ApiOperation(value = "Create vendor entitlement pool limits")
+ @Operation(description = "Create vendor entitlement pool limits")
Response createLimit(@Valid LimitRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
+ @Parameter(description = "Vendor license model version Id") @PathParam
("versionId")
String versionId,
- @ApiParam(value = "Vendor license model Entitlement Pool Id")
+ @Parameter(description = "Vendor license model Entitlement Pool Id")
@PathParam("entitlementPoolId")
String entitlementPoolId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -62,26 +67,24 @@ public interface EntitlementPoolLimits {
@GET
@Path("/")
- @ApiOperation(value = "List vendor entitlement pool limits",
- response = LimitRequestDto.class,
- responseContainer = "List")
+ @Operation(description = "List vendor entitlement pool limits", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = LimitRequestDto.class)))))
Response listLimits(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor license model Entitlement Pool Id") @PathParam("entitlementPoolId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Entitlement Pool Id") @PathParam("entitlementPoolId")
String entitlementPoolId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{limitId}")
- @ApiOperation(value = "Update vendor entitlement pool limit")
+ @Operation(description = "Update vendor entitlement pool limit")
Response updateLimit(@Valid LimitRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
+ @Parameter(description = "Vendor license model version Id") @PathParam
("versionId")
String versionId,
- @ApiParam(value = "Vendor license model Entitlement Pool Id")
+ @Parameter(description = "Vendor license model Entitlement Pool Id")
@PathParam("entitlementPoolId")
String entitlementPoolId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -90,24 +93,23 @@ public interface EntitlementPoolLimits {
@GET
@Path("/{limitId}")
- @ApiOperation(value = "Get vendor entitlement pool limit",
- response = LimitEntityDto.class)
+ @Operation(description = "Get vendor entitlement pool limit", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = LimitEntityDto.class))))
Response getLimit(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor license model Entitlement Pool Id") @PathParam
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Entitlement Pool Id") @PathParam
("entitlementPoolId") String entitlementPoolId,
- @ApiParam(value = "Vendor license model Entitlement Pool Limit Id") @PathParam("limitId")
+ @Parameter(description = "Vendor license model Entitlement Pool Limit Id") @PathParam("limitId")
String limitId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{limitId}")
- @ApiOperation(value = "Delete vendor entitlement pool limit")
+ @Operation(description = "Delete vendor entitlement pool limit")
Response deleteLimit(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor license model Entitlement pool Id") @PathParam("entitlementPoolId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Entitlement pool Id") @PathParam("entitlementPoolId")
String entitlementPoolId,
@PathParam("limitId") String limitId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java
index c635f91c8e..6b30b74bf8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/EntitlementPools.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.vendorlicense.types.EntitlementPoolEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.EntitlementPoolRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -39,61 +44,58 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/entitlement-pools")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - Entitlement Pools")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - Entitlement Pools"))
@Validated
public interface EntitlementPools {
- @GET
- @Path("/")
- @ApiOperation(value = "List vendor entitlement pools",
- response = EntitlementPoolEntityDto.class,
- responseContainer = "List")
- Response listEntitlementPools(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @GET
+ @Path("/")
+ @Operation(description = "List vendor entitlement pools", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = EntitlementPoolEntityDto.class)))))
+ Response listEntitlementPools(
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
+ @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
- @POST
- @Path("/")
- @ApiOperation(value = "Create vendor entitlement pool")
- Response createEntitlementPool(@Valid EntitlementPoolRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
- String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
- ("versionId")
- String versionId,
- @NotNull(message = USER_MISSING_ERROR_MSG)
- @HeaderParam(USER_ID_HEADER_PARAM) String user);
+ @POST
+ @Path("/")
+ @Operation(description = "Create vendor entitlement pool")
+ Response createEntitlementPool(@Valid EntitlementPoolRequestDto request,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
+ String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam
+ ("versionId")
+ String versionId,
+ @NotNull(message = USER_MISSING_ERROR_MSG)
+ @HeaderParam(USER_ID_HEADER_PARAM) String user);
- @PUT
- @Path("/{entitlementPoolId}")
- @ApiOperation(value = "Update vendor entitlement pool")
- Response updateEntitlementPool(@Valid EntitlementPoolRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
- String vlmId,
- @ApiParam(value = "Vendor license model version Id")
- @PathParam("versionId") String versionId,
- @NotNull(message = USER_MISSING_ERROR_MSG)
- @PathParam("entitlementPoolId") String entitlementPoolId,
- @HeaderParam(USER_ID_HEADER_PARAM) String user);
+ @PUT
+ @Path("/{entitlementPoolId}")
+ @Operation(description = "Update vendor entitlement pool")
+ Response updateEntitlementPool(@Valid EntitlementPoolRequestDto request,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
+ String vlmId,
+ @Parameter(description = "Vendor license model version Id")
+ @PathParam("versionId") String versionId,
+ @NotNull(message = USER_MISSING_ERROR_MSG)
+ @PathParam("entitlementPoolId") String entitlementPoolId,
+ @HeaderParam(USER_ID_HEADER_PARAM) String user);
- @GET
- @Path("/{entitlementPoolId}")
- @ApiOperation(value = "Get vendor entitlement pool",
- response = EntitlementPoolEntityDto.class)
- Response getEntitlementPool(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @PathParam("entitlementPoolId") String entitlementPoolId,
- @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
+ @GET
+ @Path("/{entitlementPoolId}")
+ @Operation(description = "Get vendor entitlement pool", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = EntitlementPoolEntityDto.class))))
+ Response getEntitlementPool(
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @PathParam("entitlementPoolId") String entitlementPoolId,
+ @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
- @DELETE
- @Path("/{entitlementPoolId}")
- @ApiOperation(value = "Delete vendor entitlement pool")
- Response deleteEntitlementPool(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @PathParam("entitlementPoolId") String entitlementPoolId,
- @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
+ @DELETE
+ @Path("/{entitlementPoolId}")
+ @Operation(description = "Delete vendor entitlement pool")
+ Response deleteEntitlementPool(
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @PathParam("entitlementPoolId") String entitlementPoolId,
+ @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java
index b52c7f23dd..b6a9d27f5d 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/FeatureGroups.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.vendorlicense.types.FeatureGroupEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.FeatureGroupModelDto;
import org.openecomp.sdcrests.vendorlicense.types.FeatureGroupRequestDto;
@@ -42,57 +47,54 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/feature-groups")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - Feature Groups")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - Feature Groups"))
@Validated
public interface FeatureGroups {
@GET
@Path("/")
- @ApiOperation(value = "List vendor feature groups",
- response = FeatureGroupEntityDto.class,
- responseContainer = "List")
+ @Operation(description = "List vendor feature groups",responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation =FeatureGroupEntityDto.class)))))
Response listFeatureGroups(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create vendor feature group")
+ @Operation(description = "Create vendor feature group")
Response createFeatureGroup(@Valid FeatureGroupRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{featureGroupId}")
- @ApiOperation(value = "Update vendor feature group")
+ @Operation(description = "Update vendor feature group")
Response updateFeatureGroup(@Valid FeatureGroupUpdateRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("featureGroupId") String featureGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{featureGroupId}")
- @ApiOperation(value = "Get vendor feature group",
- response = FeatureGroupModelDto.class)
+ @Operation(description = "Get vendor feature group", responses = @ApiResponse(content = @Content(schema = @Schema(implementation =FeatureGroupModelDto.class))))
Response getFeatureGroup(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("featureGroupId") String featureGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{featureGroupId}")
- @ApiOperation(value = "Delete vendor feature group")
+ @Operation(description = "Delete vendor feature group")
Response deleteFeatureGroup(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("featureGroupId") String featureGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
index 898071c642..506058d2af 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseAgreements.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.vendorlicense.types.LicenseAgreementEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.LicenseAgreementModelDto;
import org.openecomp.sdcrests.vendorlicense.types.LicenseAgreementRequestDto;
@@ -42,39 +47,37 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-agreements")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - License Agreements")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - License Agreements"))
@Validated
public interface LicenseAgreements {
@GET
@Path("/")
- @ApiOperation(value = "List vendor license agreements",
- response = LicenseAgreementEntityDto.class,
- responseContainer = "List")
+ @Operation(description = "List vendor license agreements", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation =LicenseAgreementEntityDto.class)))))
Response listLicenseAgreements(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create vendor license agreement")
+ @Operation(description = "Create vendor license agreement")
Response createLicenseAgreement(@Valid LicenseAgreementRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{licenseAgreementId}")
- @ApiOperation(value = "Update vendor license agreement")
+ @Operation(description = "Update vendor license agreement")
Response updateLicenseAgreement(@Valid LicenseAgreementUpdateRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@PathParam("licenseAgreementId") String licenseAgreementId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -82,20 +85,19 @@ public interface LicenseAgreements {
@GET
@Path("/{licenseAgreementId}")
- @ApiOperation(value = "Get vendor license agreement",
- response = LicenseAgreementModelDto.class)
+ @Operation(description = "Get vendor license agreement", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = LicenseAgreementModelDto.class))))
Response getLicenseAgreement(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("licenseAgreementId") String licenseAgreementId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{licenseAgreementId}")
- @ApiOperation(value = "Delete vendor license agreement")
+ @Operation(description = "Delete vendor license agreement")
Response deleteLicenseAgreement(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("licenseAgreementId") String licenseAgreementId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroupLimits.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroupLimits.java
index 753ee08b95..572017e2a8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroupLimits.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroupLimits.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.vendorlicense.types.LimitEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -40,20 +45,20 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
"/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-key-groups/{licenseKeyGroupId}/limits")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - License Key Group Limits")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - License Key Group Limits"))
@Validated
public interface LicenseKeyGroupLimits {
@POST
@Path("/")
- @ApiOperation(value = "Create vendor license key group limit")
+ @Operation(description = "Create vendor license key group limit")
Response createLimit(@Valid LimitRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
+ @Parameter(description = "Vendor license model version Id") @PathParam
("versionId")
String versionId,
- @ApiParam(value = "Vendor license model License Key Group Id")
+ @Parameter(description = "Vendor license model License Key Group Id")
@PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -61,26 +66,24 @@ public interface LicenseKeyGroupLimits {
@GET
@Path("/")
- @ApiOperation(value = "List vendor license key group limits",
- response = LimitEntityDto.class,
- responseContainer = "List")
+ @Operation(description = "List vendor license key group limits", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation = LimitEntityDto.class)))))
Response listLimits(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor license model License Key Group Id") @PathParam("licenseKeyGroupId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model License Key Group Id") @PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{limitId}")
- @ApiOperation(value = "Update vendor license key group limit")
+ @Operation(description = "Update vendor license key group limit")
Response updateLimit(@Valid LimitRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
+ @Parameter(description = "Vendor license model version Id") @PathParam
("versionId")
String versionId,
- @ApiParam(value = "Vendor license model License Key Group Id")
+ @Parameter(description = "Vendor license model License Key Group Id")
@PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -89,24 +92,23 @@ public interface LicenseKeyGroupLimits {
@GET
@Path("/{limitId}")
- @ApiOperation(value = "Get vendor entitlement pool limit",
- response = LimitEntityDto.class)
+ @Operation(description = "Get vendor entitlement pool limit", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = LimitEntityDto.class))))
Response getLimit(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor license model License Key Group") @PathParam
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model License Key Group") @PathParam
("licenseKeyGroupId") String entitlementPoolId,
- @ApiParam(value = "Vendor license model License Key Group Limit Id") @PathParam("limitId")
+ @Parameter(description = "Vendor license model License Key Group Limit Id") @PathParam("limitId")
String limitId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{limitId}")
- @ApiOperation(value = "Delete vendor license key group limit")
+ @Operation(description = "Delete vendor license key group limit")
Response deleteLimit(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
- @ApiParam(value = "Vendor license model license key group Id") @PathParam("licenseKeyGroupId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model license key group Id") @PathParam("licenseKeyGroupId")
String licenseKeyGroupId,
@PathParam("limitId") String limitId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroups.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroups.java
index 1fd9d43e60..cc599aba69 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroups.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/LicenseKeyGroups.java
@@ -20,9 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.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.vendorlicense.types.LicenseKeyGroupEntityDto;
import org.openecomp.sdcrests.vendorlicense.types.LicenseKeyGroupRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -40,37 +45,35 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-key-groups")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Model - License Key Groups")
+@OpenAPIDefinition(info = @Info(title = "Vendor License Model - License Key Groups"))
@Validated
public interface LicenseKeyGroups {
@GET
@Path("/")
- @ApiOperation(value = "List vendor license key groups",
- response = LicenseKeyGroupEntityDto.class,
- responseContainer = "List")
+ @Operation(description = "List vendor license key groups", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation =LicenseKeyGroupEntityDto.class)))))
Response listLicenseKeyGroups(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@POST
@Path("/")
- @ApiOperation(value = "Create vendor license key group")
+ @Operation(description = "Create vendor license key group")
Response createLicenseKeyGroup(@Valid LicenseKeyGroupRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@PUT
@Path("/{licenseKeyGroupId}")
- @ApiOperation(value = "Update vendor license key group")
+ @Operation(description = "Update vendor license key group")
Response updateLicenseKeyGroup(@Valid LicenseKeyGroupRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@PathParam("licenseKeyGroupId") String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@@ -78,20 +81,19 @@ public interface LicenseKeyGroups {
@GET
@Path("/{licenseKeyGroupId}")
- @ApiOperation(value = "Get vendor license key group",
- response = LicenseKeyGroupEntityDto.class)
+ @Operation(description = "Get vendor license key group",responses = @ApiResponse(content = @Content(schema = @Schema(implementation = LicenseKeyGroupEntityDto.class))))
Response getLicenseKeyGroup(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("licenseKeyGroupId") String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{licenseKeyGroupId}")
- @ApiOperation(value = "Delete vendor license key group")
+ @Operation(description = "Delete vendor license key group")
Response deleteLicenseKeyGroup(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam("versionId") String versionId,
@PathParam("licenseKeyGroupId") String licenseKeyGroupId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/VendorLicenseModels.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/VendorLicenseModels.java
index 6f4be7a208..2ad52a4639 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/VendorLicenseModels.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/VendorLicenseModels.java
@@ -17,9 +17,14 @@
package org.openecomp.sdcrests.vendorlicense.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.common.RestConstants;
import org.openecomp.sdcrests.item.types.ItemDto;
import org.openecomp.sdcrests.vendorlicense.types.VendorLicenseModelActionRequestDto;
@@ -39,19 +44,17 @@ import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG
@Path("/v1.0/vendor-license-models")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "Vendor License Models")
+@OpenAPIDefinition( info = @Info(title = "Vendor License Models"))
@Validated
public interface VendorLicenseModels {
@GET
@Path("/")
- @ApiOperation(value = "List vendor license models",
- response = ItemDto.class,
- responseContainer = "List")
- Response listLicenseModels(@ApiParam(value = "Filter to return only Vendor License Models with at" +
+ @Operation(description = "List vendor license models", responses = @ApiResponse(content = @Content(array = @ArraySchema( schema = @Schema(implementation=ItemDto.class)))))
+ Response listLicenseModels(@Parameter(description = "Filter to return only Vendor License Models with at" +
" least one version at this status. Currently supported values: 'Certified' , 'Draft'")
@QueryParam("versionFilter") String versionStatus,
- @ApiParam(value = "Filter to only return Vendor License Models at this status." +
+ @Parameter(description = "Filter to only return Vendor License Models at this status." +
"Currently supported values: 'ACTIVE' , 'ARCHIVED'." +
"Default value = 'ACTIVE'.")
@QueryParam("Status") String itemStatus,
@@ -60,37 +63,36 @@ public interface VendorLicenseModels {
@POST
@Path("/")
- @ApiOperation(value = "Create vendor license model")
+ @Operation(description = "Create vendor license model")
Response createLicenseModel(@Valid VendorLicenseModelRequestDto request,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
@DELETE
@Path("/{vlmId}")
- @ApiOperation(value = "Delete vendor license model")
+ @Operation(description = "Delete vendor license model")
Response deleteLicenseModel(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(RestConstants.USER_ID_HEADER_PARAM)
String user);
@PUT
@Path("/{vlmId}/versions/{versionId}")
- @ApiOperation(value = "Update vendor license model")
+ @Operation(description = "Update vendor license model")
Response updateLicenseModel(@Valid VendorLicenseModelRequestDto request,
- @ApiParam(value = "Vendor license model Id")
+ @Parameter(description = "Vendor license model Id")
@PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id")
+ @Parameter(description = "Vendor license model version Id")
@PathParam("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
@GET
@Path("/{vlmId}/versions/{versionId}")
- @ApiOperation(value = "Get vendor license model",
- response = VendorLicenseModelEntityDto.class)
+ @Operation(description = "Get vendor license model", responses = @ApiResponse(content = @Content(schema = @Schema(implementation=VendorLicenseModelEntityDto.class))))
Response getLicenseModel(
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId") String vlmId,
+ @Parameter(description = "Vendor license model version Id") @PathParam
("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(RestConstants.USER_ID_HEADER_PARAM)
String user);
@@ -98,11 +100,11 @@ public interface VendorLicenseModels {
@PUT
@Path("/{vlmId}/versions/{versionId}/actions")
- @ApiOperation(value = "Update vendor license model")
+ @Operation(description = "Update vendor license model")
Response actOnLicenseModel(@Valid VendorLicenseModelActionRequestDto request,
- @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
+ @Parameter(description = "Vendor license model Id") @PathParam("vlmId")
String vlmId,
- @ApiParam(value = "Vendor license model version Id") @PathParam
+ @Parameter(description = "Vendor license model version Id") @PathParam
("versionId") String versionId,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(RestConstants.USER_ID_HEADER_PARAM) String user);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java
index 9b0a83901d..88d08d6aa1 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolEntityDto.java
@@ -21,11 +21,11 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
-@ApiModel(value = "EntitlementPoolEntity")
+@Schema(description = "EntitlementPoolEntity")
public class EntitlementPoolEntityDto extends EntitlementPoolRequestDto {
private String id;
private Set<String> referencingFeatureGroups;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
index 6bc4f94b5f..dbd6ddc063 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
@@ -20,7 +20,8 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.hibernate.validator.constraints.NotBlank;
import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
@@ -30,7 +31,7 @@ import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
-@ApiModel(value = "EntitlementPoolRequest")
+@Schema(description = "EntitlementPoolRequest")
@JsonIgnoreProperties({"time", "aggregationFunction", "entitlementMetric"})
public class EntitlementPoolRequestDto {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupEntityDto.java
index 3edf283707..eac6ed38fe 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupEntityDto.java
@@ -20,12 +20,13 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.Size;
import java.util.Set;
-@ApiModel(value = "FeatureGroupEntity")
+@Schema(description = "FeatureGroupEntity")
public class FeatureGroupEntityDto extends FeatureGroupDescriptorDto {
private String id;
private Set<String> licenseKeyGroupsIds;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupModelDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupModelDto.java
index 1572320bb1..44404c3b1f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupModelDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupModelDto.java
@@ -20,12 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Collection;
import java.util.Set;
-@ApiModel(value = "FeatureGroupModel")
+@Schema(description = "FeatureGroupModel")
public class FeatureGroupModelDto extends FeatureGroupDescriptorDto {
private String id;
private Set<String> referencingLicenseAgreements;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupRequestDto.java
index 282e797f1b..3aefaa1d45 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupRequestDto.java
@@ -20,11 +20,12 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
-@ApiModel(value = "FeatureGroupRequest")
+@Schema(description = "FeatureGroupRequest")
public class FeatureGroupRequestDto extends FeatureGroupDescriptorDto {
private Set<String> addedLicenseKeyGroupsIds;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupUpdateRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupUpdateRequestDto.java
index 002e48bb2c..9e3fab59ee 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupUpdateRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupUpdateRequestDto.java
@@ -20,11 +20,12 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
-@ApiModel(value = "FeatureGroupUpdateRequest")
+@Schema(description = "FeatureGroupUpdateRequest")
public class FeatureGroupUpdateRequestDto extends FeatureGroupRequestDto {
private Set<String> removedLicenseKeyGroupsIds;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementEntityDto.java
index 23d1218b74..e3b6207eaa 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementEntityDto.java
@@ -21,12 +21,13 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.Size;
import java.util.Set;
-@ApiModel(value = "LicenseAgreementEntity")
+@Schema(description = "LicenseAgreementEntity")
public class LicenseAgreementEntityDto extends LicenseAgreementDescriptorDto {
private String id;
@Size(min = 1)
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementModelDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementModelDto.java
index a3460c321f..3c97756c3c 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementModelDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementModelDto.java
@@ -20,11 +20,13 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
-@ApiModel(value = "LicenseAgreementModel")
+@Schema(description = "LicenseAgreementModel")
public class LicenseAgreementModelDto extends LicenseAgreementDescriptorDto {
private String id;
private Set<FeatureGroupEntityDto> featureGroups;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementRequestDto.java
index 3830bdb713..358dcef8e2 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementRequestDto.java
@@ -20,11 +20,12 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
-@ApiModel(value = "LicenseAgreementRequest")
+@Schema(description = "LicenseAgreementRequest")
public class LicenseAgreementRequestDto extends LicenseAgreementDescriptorDto {
private Set<String> addedFeatureGroupsIds;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementUpdateRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementUpdateRequestDto.java
index 2590bcf519..6baba8acb3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementUpdateRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LicenseAgreementUpdateRequestDto.java
@@ -20,11 +20,12 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Set;
-@ApiModel(value = "LicenseAgreementUpdateRequest")
+@Schema(description = "LicenseAgreementUpdateRequest")
public class LicenseAgreementUpdateRequestDto extends LicenseAgreementRequestDto {
private Set<String> removedFeatureGroupsIds;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
index aa58d80936..116be31a40 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/LimitRequestDto.java
@@ -20,12 +20,12 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.Size;
-@ApiModel(value = "LimitRequest")
+@Schema(description = "LimitRequest")
public class LimitRequestDto {
@NotBlank(message = "is mandatory and should not be empty")
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelEntityDto.java
index f88926c300..2162006c16 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelEntityDto.java
@@ -20,9 +20,10 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
-@ApiModel(value = "VendorLicenseModelEntity")
+import io.swagger.v3.oas.annotations.media.Schema;
+
+@Schema(description = "VendorLicenseModelEntity")
public class VendorLicenseModelEntityDto extends VendorLicenseModelRequestDto {
private String id;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java
index 57b936a57f..da2a3e742d 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/VendorLicenseModelRequestDto.java
@@ -20,12 +20,14 @@
package org.openecomp.sdcrests.vendorlicense.types;
-import io.swagger.annotations.ApiModel;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
-@ApiModel(value = "VendorLicenseModelRequest")
+@Schema(description = "VendorLicenseModelRequest")
public class VendorLicenseModelRequestDto {
@NotNull
@Size(max = 25)
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml
index 73b6c5fc8b..e4ff82986a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml
@@ -85,7 +85,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/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")
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDetailsDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDetailsDto.java
index cf8ccf9cf7..fbc51a414b 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDetailsDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDetailsDto.java
@@ -16,7 +16,7 @@
package org.openecomp.sdcrests.vendorsoftwareproducts.types;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
@@ -25,7 +25,7 @@ import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
*/
@Data
-@ApiModel(value = "VspDetails")
+@Schema(description = "VspDetails")
public class VspDetailsDto extends VspRequestDto {
private String id;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/pom.xml
index 5d14cac6e6..ee8738c788 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/pom.xml
@@ -35,7 +35,7 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
index 8723bf2237..8c0e004732 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vnf-repository-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/VnfPackageRepository.java
@@ -19,9 +19,6 @@ package org.openecomp.sdcrests.vsp.rest;
import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
import java.io.File;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
@@ -33,43 +30,51 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+
+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.openecomp.sdcrests.vendorsoftwareproducts.types.UploadFileResponseDto;
import org.springframework.validation.annotation.Validated;
@Path("/v1.0/vendor-software-products/{vspId}/versions/{versionId}/vnfrepository")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Api(value = "VNF Repository packages")
+@OpenAPIDefinition(info = @Info(title = "VNF Repository packages"))
@Validated
public interface VnfPackageRepository extends VspEntities {
@GET
@Path("/vnfpackages")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Get VNF packages from VNF Repository",
- notes = "Call VNF Repository to get VNF package details", response = File.class)
+ @Operation(description = "Get VNF packages from VNF Repository",
+ summary = "Call VNF Repository to get VNF package details", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = File.class))))
Response getVnfPackages(@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;
@GET
@Path("/vnfpackage/{csarId}/download")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- @ApiOperation(value = "Download VNF package from VNF Repository",
- notes = "Download VNF package from VNF repository and send to client", response = File.class)
+ @Operation(description = "Download VNF package from VNF Repository",
+ summary = "Download VNF package from VNF repository and send to client", responses = @ApiResponse(content = @Content(schema = @Schema(implementation = File.class))))
Response downloadVnfPackage(@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@PathParam("csarId") String csarId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user) throws Exception;
@POST
@Path("/vnfpackage/{csarId}/import")
@Produces(MediaType.APPLICATION_JSON)
- @ApiOperation(value = "Import VNF package from VNF Repository",
- notes = "Call VNF Repository to download VNF package, validate it and send the response",
- response = UploadFileResponseDto.class)
+ @Operation(description = "Import VNF package from VNF Repository",
+ summary = "Call VNF Repository to download VNF package, validate it and send the response",
+ responses = @ApiResponse(content = @Content(schema = @Schema(implementation = UploadFileResponseDto.class))))
Response importVnfPackage(@PathParam("vspId") String vspId,
- @ApiParam(value = "Version Id") @PathParam("versionId") String versionId,
+ @Parameter(description = "Version Id") @PathParam("versionId") String versionId,
@PathParam("csarId") String csarId,
@NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user) throws Exception;
diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml
index 684c2bb7df..acca0228b5 100644
--- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/pom.xml
@@ -39,7 +39,7 @@
<version>${jackson.mapper.version}</version>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/pom.xml b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/pom.xml
index a01b21f197..22bfd21f5e 100644
--- a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/pom.xml
@@ -21,7 +21,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/TestErrorBody.java b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/TestErrorBody.java
index 79a3765596..d721f8997a 100644
--- a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/TestErrorBody.java
+++ b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/TestErrorBody.java
@@ -17,7 +17,7 @@
package org.openecomp.core.externaltesting.api;
import com.fasterxml.jackson.annotation.JsonInclude;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@@ -27,7 +27,7 @@ import java.io.Serializable;
*/
@SuppressWarnings("unused")
@JsonInclude(JsonInclude.Include.NON_NULL)
-@ApiModel("Body for errors such as http 500")
+@Schema(description = "Body for errors such as http 500")
@Data
public class TestErrorBody implements Serializable {
diff --git a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestCaseOutput.java b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestCaseOutput.java
index b7b66b7b0b..7d4ae84544 100644
--- a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestCaseOutput.java
+++ b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestCaseOutput.java
@@ -17,12 +17,12 @@
package org.openecomp.core.externaltesting.api;
import com.fasterxml.jackson.annotation.JsonInclude;
-import io.swagger.annotations.ApiModel;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@JsonInclude(JsonInclude.Include.NON_NULL)
-@ApiModel("VtpTestSuite")
+@Schema(description = "VtpTestSuite")
@Data
@EqualsAndHashCode(callSuper=true)
class VtpTestCaseOutput extends VtpNameDescriptionPair {
diff --git a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
index 985ab0f7e0..b970440c4b 100644
--- a/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-model-lib/openecomp-sdc-model-api/pom.xml
@@ -31,7 +31,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
index e25573fc56..4249b45abd 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
@@ -32,7 +32,7 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
@@ -59,4 +59,4 @@
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml
index cd8f19f949..660eaffc07 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/pom.xml
@@ -48,7 +48,7 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml
index cc2001f640..fd4fbe89af 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/pom.xml
@@ -21,7 +21,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>