summaryrefslogtreecommitdiffstats
path: root/engine-d/src/main/java
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-09-20 21:18:36 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-09-20 21:18:36 +0800
commitfe3bae00cfa7eac9618856b1dd10a8c03daa8810 (patch)
tree78b83cbfbafbe71b6eb4cf1983acb50efef953b6 /engine-d/src/main/java
parent0f6dfe71bdab3b8cb56cda7ca05b5af984b8d938 (diff)
Add Swagger Related Configurations
Change-Id: I54ec08d909a2b37b9296d1dd4e581a12d021bec1 Issue-ID: HOLMES-54 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d/src/main/java')
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java15
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/resources/HealthCheck.java2
2 files changed, 11 insertions, 6 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java b/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java
index 3480dbb..8f9a271 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/resources/EngineResources.java
@@ -19,6 +19,7 @@ package org.onap.holmes.engine.resources;
import com.codahale.metrics.annotation.Timed;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
import java.util.Locale;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
@@ -42,7 +43,7 @@ import org.onap.holmes.engine.response.CorrelationRuleResponse;
@Service
@Path("/rule")
-@Api(tags = {"Engine Manager"})
+@Api(tags = {"Holmes Engine Management"})
@Produces(MediaType.APPLICATION_JSON)
@Slf4j
public class EngineResources {
@@ -51,10 +52,14 @@ public class EngineResources {
DroolsEngine droolsEngine;
@PUT
- @ApiOperation(value = "Add rule to Engine and Cache", response = CorrelationRuleResponse.class)
+ @ApiOperation(value = "Deploy a rule into the Drools engine.", response = CorrelationRuleResponse.class)
@Produces(MediaType.APPLICATION_JSON)
@Timed
- public CorrelationRuleResponse deployRule(DeployRuleRequest deployRuleRequest,
+ public CorrelationRuleResponse deployRule(
+ @ApiParam(value = "The request entity of the HTTP call, which comprises two "
+ + "fields: \"content\" and \"engineid\". "
+ + "The \"content\" should be a valid Drools rule string and the \"engineid\" "
+ + "has to be \"engine-d\" in the Amsterdam release.", required = true) DeployRuleRequest deployRuleRequest,
@Context HttpServletRequest httpRequest) {
CorrelationRuleResponse crResponse = new CorrelationRuleResponse();
@@ -74,7 +79,7 @@ public class EngineResources {
}
@DELETE
- @ApiOperation(value = "delete rule")
+ @ApiOperation(value = "Undeploy a rule from the Drools engine.")
@Produces(MediaType.APPLICATION_JSON)
@Timed
@Path("/{packageName}")
@@ -96,7 +101,7 @@ public class EngineResources {
@POST
- @ApiOperation(value = "compile rule")
+ @ApiOperation(value = "Check the validity of a rule.")
@Produces(MediaType.APPLICATION_JSON)
@Timed
public boolean compileRule(CompileRuleRequest compileRuleRequest,
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/resources/HealthCheck.java b/engine-d/src/main/java/org/onap/holmes/engine/resources/HealthCheck.java
index da2bf1b..c86bf06 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/resources/HealthCheck.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/resources/HealthCheck.java
@@ -29,7 +29,7 @@ import org.jvnet.hk2.annotations.Service;
@Service
@SwaggerDefinition
@Path("/healthcheck")
-@Api(tags = {"HealthCheck"})
+@Api(tags = {"Health Check"})
@Produces(MediaType.TEXT_PLAIN)
@Slf4j
public class HealthCheck {