diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-09-20 21:18:36 +0800 |
---|---|---|
committer | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-09-20 21:18:36 +0800 |
commit | fe3bae00cfa7eac9618856b1dd10a8c03daa8810 (patch) | |
tree | 78b83cbfbafbe71b6eb4cf1983acb50efef953b6 /engine-d/src/main/resources | |
parent | 0f6dfe71bdab3b8cb56cda7ca05b5af984b8d938 (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/resources')
-rw-r--r-- | engine-d/src/main/resources/swagger.json | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/engine-d/src/main/resources/swagger.json b/engine-d/src/main/resources/swagger.json new file mode 100644 index 0000000..4dd3f6d --- /dev/null +++ b/engine-d/src/main/resources/swagger.json @@ -0,0 +1,128 @@ +{ + "swagger" : "2.0", + "info" : { + "description" : "This page shows all the APIs available in the Holmes engine management module.", + "version" : "v1", + "title" : "API Descriptions for Holmes Engine Management", + "termsOfService" : "http://www.github.com/kongchen/swagger-maven-plugin", + "contact" : { + "name" : "Guangrong Fu", + "email" : "fu.guangrong@zte.com.cn" + }, + "license" : { + "name" : "Apache 2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "basePath" : "/api/holmes-engine-mgmt/v1/", + "tags" : [ { + "name" : "Health Check" + }, { + "name" : "Holmes Engine Management" + } ], + "paths" : { + "/healthcheck" : { + "get" : { + "tags" : [ "Health Check" ], + "summary" : "Interface for the health check of the engine management module for Holmes", + "description" : "", + "operationId" : "healthCheck", + "produces" : [ "text/plain" ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "boolean" + } + } + } + } + }, + "/rule" : { + "post" : { + "tags" : [ "Holmes Engine Management" ], + "summary" : "Check the validity of a rule.", + "description" : "", + "operationId" : "compileRule", + "produces" : [ "application/json" ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "boolean" + } + } + } + }, + "put" : { + "tags" : [ "Holmes Engine Management" ], + "summary" : "Deploy a rule into the Drools engine.", + "description" : "", + "operationId" : "deployRule", + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "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, + "schema" : { + "$ref" : "#/definitions/DeployRuleRequest" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/CorrelationRuleResponse" + } + } + } + } + }, + "/rule/{packageName}" : { + "delete" : { + "tags" : [ "Holmes Engine Management" ], + "summary" : "Undeploy a rule from the Drools engine.", + "description" : "", + "operationId" : "undeployRule", + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "packageName", + "in" : "path", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "boolean" + } + } + } + } + } + }, + "definitions" : { + "CorrelationRuleResponse" : { + "type" : "object", + "properties" : { + "package" : { + "type" : "string" + } + } + }, + "DeployRuleRequest" : { + "type" : "object", + "required" : [ "content" ], + "properties" : { + "content" : { + "type" : "string" + }, + "engineid" : { + "type" : "string" + } + } + } + } +}
\ No newline at end of file |