aboutsummaryrefslogtreecommitdiffstats
path: root/services/activity-spec/activity-spec-web
diff options
context:
space:
mode:
authorsheetalm <sheetal.mudholkar@amdocs.com>2018-04-26 15:05:17 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-04-30 09:15:08 +0000
commit49169af40f9082503e26014323d7873994feef6d (patch)
treeffa200d3ced356175183b8bdd2549bab172e3172 /services/activity-spec/activity-spec-web
parent8f5030f8cf785a9c2d869351126bc43c038434c2 (diff)
ActivitySpec Add USER_ID header in swagger in Apis
Add mandatory USER_ID header parameter to swagger. Change-Id: If517694417611864afb59ddebfef84a12d6da96c Issue-ID: SDC-1048 Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.com>
Diffstat (limited to 'services/activity-spec/activity-spec-web')
-rw-r--r--services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/api/rest/ActivitySpecs.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/api/rest/ActivitySpecs.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/api/rest/ActivitySpecs.java
index 06b85246af..f6c5486b4d 100644
--- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/api/rest/ActivitySpecs.java
+++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/api/rest/ActivitySpecs.java
@@ -19,6 +19,8 @@ package org.onap.sdc.activityspec.api.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
import org.onap.sdc.activityspec.api.rest.types.ActivitySpecActionRequestDto;
import org.onap.sdc.activityspec.api.rest.types.ActivitySpecRequestDto;
import org.springframework.validation.annotation.Validated;
@@ -35,6 +37,8 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import static org.onap.sdc.activityspec.utils.ActivitySpecConstant.USER_ID_HEADER_PARAM;
+
@Path("/v1.0/activity-spec/")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@@ -45,17 +49,23 @@ public interface ActivitySpecs {
@POST
@Path("/")
@ApiOperation(value = "Create Activity Spec")
+ @ApiImplicitParams({@ApiImplicitParam(name = USER_ID_HEADER_PARAM, required = true, dataType = "string",
+ paramType = "header")})
Response createActivitySpec(@Valid ActivitySpecRequestDto request);
@GET
@Path("/{id}/versions/{versionId}")
@ApiOperation(value = "Get Activity Spec")
+ @ApiImplicitParams({@ApiImplicitParam(name = USER_ID_HEADER_PARAM, required = true, dataType = "string",
+ paramType = "header")})
Response getActivitySpec(@ApiParam(value = "Activity Spec Id") @PathParam("id") String id,
@ApiParam(value = "Version Id") @PathParam("versionId") String versionId);
@PUT
@Path("/{id}/versions/{versionId}")
@ApiOperation(value = "Update Activity Spec")
+ @ApiImplicitParams({@ApiImplicitParam(name = USER_ID_HEADER_PARAM, required = true, dataType = "string",
+ paramType = "header")})
Response updateActivitySpec(@Valid ActivitySpecRequestDto request,
@ApiParam(value = "Activity Spec Id") @PathParam("id") String id,
@ApiParam(value = "Version Id") @PathParam("versionId") String versionId);
@@ -65,6 +75,8 @@ public interface ActivitySpecs {
@ApiOperation(value = "Actions on a activity spec",
notes = "Performs one of the following actions on a activity spec: |" + "CERTIFY: Certifies activity spec.|"
+ "DEPRECATE: Deprecates activity spec.|" + "DELETE: Deletes activity spec.")
+ @ApiImplicitParams({@ApiImplicitParam(name = USER_ID_HEADER_PARAM, required = true, dataType = "string",
+ paramType = "header")})
Response actOnActivitySpec(ActivitySpecActionRequestDto request,
@ApiParam(value = "Activity Spec Id") @PathParam("id") String id,
@ApiParam(value = "Version Id") @PathParam("versionId") String versionId);
@@ -72,6 +84,8 @@ public interface ActivitySpecs {
@GET
@Path("/")
@ApiOperation(value = "Get list of activity specs ", responseContainer = "List")
+ @ApiImplicitParams({@ApiImplicitParam(name = USER_ID_HEADER_PARAM, required = true, dataType = "string",
+ paramType = "header")})
Response list(@ApiParam(value = "List activity specs based on status filter") @QueryParam("status")
String versionStatus);
}