summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-07-02 15:33:25 +0300
committerTal Gitelman <tg851x@intl.att.com>2017-07-02 15:33:25 +0300
commitffdda7d685029d6a88ac82ac637e43bba96423cb (patch)
treefffb5e281c5fd9cd60bffc0e6e84f0b4a5470c01 /catalog-be
parented7e1c3dfe332abc67ed943717db2ee94406f95e (diff)
[sdc] - latest swagger, dependencies, tests fix
Change-Id: I7034981b2e83253ffe83688c2cab0fe33f1a92fc Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/pom.xml2
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java19
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java5
4 files changed, 17 insertions, 14 deletions
diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml
index 2efa9e9302..9d736022a0 100644
--- a/catalog-be/pom.xml
+++ b/catalog-be/pom.xml
@@ -491,7 +491,7 @@
</dependency>
<dependency>
- <groupId>${dox-common-lib.groupId}</groupId>
+ <groupId>org.openecomp.sdc.common</groupId>
<artifactId>openecomp-common-lib</artifactId>
<version>${dox-common-lib.version}</version>
<type>pom</type>
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java
index 532cc1767b..6a7490650d 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/distribution/servlet/DistributionServlet.java
@@ -230,18 +230,23 @@ public class DistributionServlet extends BeGenericServlet {
* @param accept
* @return
*/
- //TODO Get the missing AID for this API
@GET
@Path("/artifactTypes")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
- @ApiOperation(value = "Artifact types list", httpMethod = "GET", notes = "Fetches available artifact types list", response = String.class)
- @ApiResponses(value = { @ApiResponse(code = 200, message = "Artifact types list fetched successfully"), @ApiResponse(code = 500, message = "One or more BE components (Titan, ES, BE) are down") })
+ @ApiOperation(value = "Artifact types list", httpMethod = "GET", notes = "Fetches available artifact types list")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Artifact types list fetched successfully", response = String.class),
+ @ApiResponse(code = 400, message = "Missing “X-ECOMP-InstanceID” HTTP header - POL5001"),
+ @ApiResponse(code = 401, message = "ECOMP component should authenticate itself and to re-send again HTTP request with its Basic Authentication credentials - POL5002"),
+ @ApiResponse(code = 403, message = "ECOMP component is not authorized - POL5003"),
+ @ApiResponse(code = 405, message = "Method Not Allowed : Invalid HTTP method type used to register for distribution ( POST,PUT,DELETE will be rejected) - POL4050"),
+ @ApiResponse(code = 500, message = "The registration failed due to internal SDC problem or Cambria Service failure ECOMP Component should continue the attempts to register for distribution - POL5000")})
public Response getValidArtifactTypes(@Context final HttpServletRequest request,
- @HeaderParam(value = Constants.X_ECOMP_REQUEST_ID_HEADER) String requestId,
- @HeaderParam(value = Constants.X_ECOMP_INSTANCE_ID_HEADER) String instanceId,
- @HeaderParam(value = Constants.AUTHORIZATION_HEADER) String authorization,
- @HeaderParam(value = Constants.ACCEPT_HEADER) String accept) {
+ @ApiParam(value = "X-ECOMP-RequestID header", required = false)@HeaderParam(value = Constants.X_ECOMP_REQUEST_ID_HEADER) String requestId,
+ @ApiParam(value = "X-ECOMP-InstanceID header", required = true)@HeaderParam(value = Constants.X_ECOMP_INSTANCE_ID_HEADER) String instanceId,
+ @ApiParam(value = "The username and password", required = true)@HeaderParam(value = Constants.AUTHORIZATION_HEADER) String authorization,
+ @ApiParam(value = "The username and password", required = true)@HeaderParam(value = Constants.ACCEPT_HEADER) String accept) {
init(request);
String url = request.getMethod() + " " + request.getRequestURI();
log.debug("Start handle request of {}", url);
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
index 2c1ef925c8..f6251689bc 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java
@@ -68,7 +68,6 @@ import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
-import org.openecomp.sdc.be.distribution.api.client.TopicRegistrationResponse;
import org.openecomp.sdc.be.ecomp.converters.AssetMetadataConverter;
import org.openecomp.sdc.be.externalapi.servlet.representation.AssetMetadata;
import org.openecomp.sdc.be.model.Component;
@@ -93,14 +92,14 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jcabi.aspects.Loggable;
+
+import fj.data.Either;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
-import fj.data.Either;
-
/**
* This Servlet serves external users for retrieving component metadata.
*
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
index 9bf4b681bd..d7db4ec3a3 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/ComponentInstanceServlet.java
@@ -53,7 +53,6 @@ import org.openecomp.sdc.be.info.GroupDefinitionInfo;
import org.openecomp.sdc.be.model.ComponentInstance;
import org.openecomp.sdc.be.model.ComponentInstanceInput;
import org.openecomp.sdc.be.model.ComponentInstanceProperty;
-import org.openecomp.sdc.be.model.InputDefinition;
import org.openecomp.sdc.be.model.PropertyConstraint;
import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
import org.openecomp.sdc.be.model.Resource;
@@ -70,14 +69,14 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.jcabi.aspects.Loggable;
+
+import fj.data.Either;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
-import fj.data.Either;
-
/**
* Root resource (exposed at "/" path)
* .json