import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
-import org.apache.cxf.jaxrs.ext.multipart.Multipart;
-import org.openecomp.sdc.vendorsoftwareproduct.types.FileDataStructureDto;
-import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdcrests.item.types.ItemCreationDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.PackageInfoDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.QuestionnaireResponseDto;
-import org.openecomp.sdcrests.vendorsoftwareproducts.types.UploadFileResponseDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.VersionSoftwareProductActionRequestDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspComputeDto;
-import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspCreationDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto;
+import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspRequestDto;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.validation.IsValidJson;
import org.springframework.validation.annotation.Validated;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import java.io.File;
+import java.io.IOException;
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")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@POST
@Path("/")
@ApiOperation(value = "Create a new vendor software product",
- response = VspCreationDto.class)
- Response createVsp(@Valid VspDescriptionDto vspDescriptionDto,
+ response = ItemCreationDto.class)
+ Response createVsp(@Valid VspRequestDto vspRequestDto,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
@ApiOperation(value = "Get list of vendor software products and their description",
responseContainer = "List")
Response listVsps(@ApiParam(
- value = "Currently supported values: 'Final' - only vendor software products with final "
+ value = "Currently supported values: 'Certified' - only vendor software products with final "
+ " version will be return - with their latest final version")
- @QueryParam("versionFilter") String versionFilter,
+ @QueryParam("versionFilter") String versionStatus,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user);
-
@GET
@Path("/{vspId}/versions/{versionId}")
@ApiOperation(value = "Get details of a vendor software product")
+ "Checkin: Unlocks it and activates the edited version to all users.| "
+ "Submit: Finalize its active version.|"
+ "Create_Package: Creates a CSAR zip file.|")
- Response actOnVendorSoftwareProduct(@PathParam("vspId") String vspId,
+ Response actOnVendorSoftwareProduct(VersionSoftwareProductActionRequestDto request,
+ @PathParam("vspId") String vspId,
@PathParam("versionId") String versionId,
- VersionSoftwareProductActionRequestDto request,
@NotNull(message = USER_MISSING_ERROR_MSG)
@HeaderParam(USER_ID_HEADER_PARAM) String user)
throws IOException;
@ApiOperation(value = "Get list of vendor software product compute-flavors",
response = VspComputeDto.class,
responseContainer = "List")
- Response listCompute(@ApiParam(value = "Vendor software product Id") @PathParam("vspId") String
- vspId,
- @PathParam("versionId") String versionId,
- @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM)
- String user);
+ Response listComputes(@ApiParam(value = "Vendor software product Id")
+ @PathParam("vspId") String vspId,
+ @PathParam("versionId") String versionId,
+ @NotNull(message = USER_MISSING_ERROR_MSG)
+ @HeaderParam(USER_ID_HEADER_PARAM) String user);
}