You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/03/21 12:34:43 UTC

lucene-solr:apiv2: SOLR-8029: more api spec

Repository: lucene-solr
Updated Branches:
  refs/heads/apiv2 6aedeb9c4 -> 8a5e76f4c


SOLR-8029: more api spec


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8a5e76f4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8a5e76f4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8a5e76f4

Branch: refs/heads/apiv2
Commit: 8a5e76f4c93111265d1d0b648491091a3572ad85
Parents: 6aedeb9
Author: Noble Paul <no...@apache.org>
Authored: Mon Mar 21 17:04:29 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Mon Mar 21 17:04:29 2016 +0530

----------------------------------------------------------------------
 .../apache/solr/handler/SolrConfigHandler.java  |   6 +-
 .../src/resources/apispec/core.ConfigEdit.json  | 113 ---------------
 .../src/resources/apispec/core.ConfigRead.json  |  20 ---
 .../apispec/core.SchemaEdit.addField.json       |   1 +
 .../core.config.Commands.addRuntimeLib.json     |  23 +++
 .../resources/apispec/core.config.Commands.json | 145 +++++++++++++++++++
 .../core.config.Commands.updateRuntimeLib.json  |  23 +++
 .../apispec/core.config.Params.Commands.json    |  27 ++++
 .../resources/apispec/core.config.Params.json   |  12 ++
 .../core/src/resources/apispec/core.config.json |  17 +++
 10 files changed, 252 insertions(+), 135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
index 4182f4d..0743199 100644
--- a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
@@ -834,8 +834,10 @@ public class SolrConfigHandler extends RequestHandlerBase implements SolrCoreAwa
   @Override
   public Collection<Api> getApis() {
     return ImmutableList.of(
-        wrapRequestHandler(this, ApiBag.getSpec("core.ConfigRead")),
-        wrapRequestHandler(this, ApiBag.getSpec("core.ConfigEdit"))
+        wrapRequestHandler(this, ApiBag.getSpec("core.config")),
+        wrapRequestHandler(this, ApiBag.getSpec("core.config.Commands")),
+        wrapRequestHandler(this, ApiBag.getSpec("core.config.Params")),
+        wrapRequestHandler(this, ApiBag.getSpec("core.config.Params.Commands"))
 
     );
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.ConfigEdit.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.ConfigEdit.json b/solr/core/src/resources/apispec/core.ConfigEdit.json
deleted file mode 100644
index 32c129d..0000000
--- a/solr/core/src/resources/apispec/core.ConfigEdit.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
-  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API",
-  "methods": [
-    "POST"
-  ],
-  "url": {
-    "paths": [
-      "$handlerName",
-      "$handlerName/params"
-    ]
-  },
-  "commands": {
-    "add-requesthandler": {
-      "additionalProperties": true
-    },
-    "update-requesthandler": {
-      "additionalProperties": true
-    },
-    "delete-requesthandler": {
-      "additionalProperties": true
-    },
-    "add-searchcomponent": {
-      "additionalProperties": true
-    },
-    "update-searchcomponent": {
-      "additionalProperties": true
-    },
-    "delete-searchcomponent": {
-      "additionalProperties": true
-    },
-    "add-initparams": {
-      "additionalProperties": true
-    },
-    "update-initparams": {
-      "additionalProperties": true
-    },
-    "delete-initparams": {
-      "additionalProperties": true
-    },
-    "add-queryresponsewriter": {
-      "additionalProperties": true
-    },
-    "update-queryresponsewriter": {
-      "additionalProperties": true
-    },
-    "delete-queryresponsewriter": {
-      "additionalProperties": true
-    },
-    "add-queryparser": {
-      "additionalProperties": true
-    },
-    "update-queryparser": {
-      "additionalProperties": true
-    },
-    "delete-queryparser": {
-      "additionalProperties": true
-    },
-    "add-valuesourceparser": {
-      "additionalProperties": true
-    },
-    "update-valuesourceparser": {
-      "additionalProperties": true
-    },
-    "delete-valuesourceparser": {
-      "additionalProperties": true
-    },
-    "add-transformer": {
-      "additionalProperties": true
-    },
-    "update-transformer": {
-      "additionalProperties": true
-    },
-    "delete-transformer": {
-      "additionalProperties": true
-    },
-    "add-updateprocessor": {
-      "additionalProperties": true
-    },
-    "update-updateprocessor": {
-      "additionalProperties": true
-    },
-    "delete-updateprocessor": {
-      "additionalProperties": true
-    },
-    "add-queryconverter": {
-      "additionalProperties": true
-    },
-    "update-queryconverter": {
-      "additionalProperties": true
-    },
-    "delete-queryconverter": {
-      "additionalProperties": true
-    },
-    "add-listener": {
-      "additionalProperties": true
-    },
-    "update-listener": {
-      "additionalProperties": true
-    },
-    "delete-listener": {
-      "additionalProperties": true
-    },
-    "add-runtimelib": {
-      "additionalProperties": true
-    },
-    "update-runtimelib": {
-      "additionalProperties": true
-    },
-    "delete-runtimelib": {
-      "additionalProperties": true
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.ConfigRead.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.ConfigRead.json b/solr/core/src/resources/apispec/core.ConfigRead.json
deleted file mode 100644
index 9f34573..0000000
--- a/solr/core/src/resources/apispec/core.ConfigRead.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "documentation": "https://cwiki.apache.org/confluence/display/solr/Config+API",
-  "methods": [
-    "GET"
-  ],
-  "url": {
-    "paths": [
-      "$handlerName",
-      "$handlerName/overlay",
-      "$handlerName/params",
-      "$handlerName/params",
-      "$handlerName/query",
-      "$handlerName/jmx",
-      "$handlerName/requestDispatcher",
-      "$handlerName/znodeVersion",
-      "$handlerName/{plugin}"
-    ]
-  },
-  "body": null
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.SchemaEdit.addField.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addField.json b/solr/core/src/resources/apispec/core.SchemaEdit.addField.json
index ca302d0..8fc2dfd 100644
--- a/solr/core/src/resources/apispec/core.SchemaEdit.addField.json
+++ b/solr/core/src/resources/apispec/core.SchemaEdit.addField.json
@@ -1,5 +1,6 @@
 {
   "documentation" :"https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-AddaNewField",
+  "type":"object",
   "properties":{
     "name": {
       "type": "string"

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.config.Commands.addRuntimeLib.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Commands.addRuntimeLib.json b/solr/core/src/resources/apispec/core.config.Commands.addRuntimeLib.json
new file mode 100644
index 0000000..42a229d
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.Commands.addRuntimeLib.json
@@ -0,0 +1,23 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Adding+Custom+Plugins+in+SolrCloud+Mode",
+  "description": "",
+  "type": "object",
+  "properties": {
+    "name": {
+      "description": "Name of the jar blob in .system collection",
+      "type": "string"
+    },
+    "version": {
+      "type": "int",
+      "description": "The version of the blob in .system colection"
+    },
+    "sig": {
+      "type": "string",
+      "description": "sha1 signature of the jar"
+    }
+  },
+  "required": [
+    "name",
+    "version"
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.config.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Commands.json b/solr/core/src/resources/apispec/core.config.Commands.json
new file mode 100644
index 0000000..0eb3274
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.Commands.json
@@ -0,0 +1,145 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Config+API",
+  "description": "The Config API enables manipulating various aspects of your solrconfig.xml using REST-like API calls.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/config"
+    ]
+  },
+  "commands": {
+    "set-property:": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "unset-property": {
+      "type": "list"
+    },
+    "add-requesthandler": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-requesthandler": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-requesthandler": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-searchcomponent": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-searchcomponent": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-searchcomponent": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-initparams": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-initparams": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-initparams": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-queryresponsewriter": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-queryresponsewriter": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-queryresponsewriter": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-queryparser": {
+      "additionalProperties": true
+    },
+    "update-queryparser": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-queryparser": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-valuesourceparser": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-valuesourceparser": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-valuesourceparser": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-transformer": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-transformer": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-transformer": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-updateprocessor": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-updateprocessor": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-updateprocessor": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-queryconverter": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-queryconverter": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-queryconverter": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-listener": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "update-listener": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "delete-listener": {
+      "type": "object",
+      "additionalProperties": true
+    },
+    "add-runtimelib": "core.config.Commands.addRuntimeLib",
+    "update-runtimelib": "core.config.Commands.updateRuntimeLib",
+    "delete-runtimelib": {
+      "type": "list"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.config.Commands.updateRuntimeLib.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Commands.updateRuntimeLib.json b/solr/core/src/resources/apispec/core.config.Commands.updateRuntimeLib.json
new file mode 100644
index 0000000..42a229d
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.Commands.updateRuntimeLib.json
@@ -0,0 +1,23 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Adding+Custom+Plugins+in+SolrCloud+Mode",
+  "description": "",
+  "type": "object",
+  "properties": {
+    "name": {
+      "description": "Name of the jar blob in .system collection",
+      "type": "string"
+    },
+    "version": {
+      "type": "int",
+      "description": "The version of the blob in .system colection"
+    },
+    "sig": {
+      "type": "string",
+      "description": "sha1 signature of the jar"
+    }
+  },
+  "required": [
+    "name",
+    "version"
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.config.Params.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Params.Commands.json b/solr/core/src/resources/apispec/core.config.Params.Commands.json
new file mode 100644
index 0000000..bf6a966
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.Params.Commands.json
@@ -0,0 +1,27 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Request+Parameters+API",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/config/params"
+    ]
+  },
+  "commands": {
+    "set:": {
+      "description":"add or overwrite one or more param sets",
+      "type": "object",
+      "additionalProperties": true
+    },
+    "unset": {
+      "type": "list",
+      "description": "delete one or more parameter sets"
+    },
+    "update": {
+      "description": "update one or more configsets",
+      "type": "object",
+      "additionalProperties": true
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.config.Params.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Params.json b/solr/core/src/resources/apispec/core.config.Params.json
new file mode 100644
index 0000000..b256e66
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.Params.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Request+Parameters+API",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/config/params",
+      "/config/params/{params_set}"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a5e76f4/solr/core/src/resources/apispec/core.config.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.json b/solr/core/src/resources/apispec/core.config.json
new file mode 100644
index 0000000..0645967
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.json
@@ -0,0 +1,17 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Config+API",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/config",
+      "/config/overlay",
+      "/config/query",
+      "/config/jmx",
+      "/config/requestDispatcher",
+      "/config/znodeVersion",
+      "/config/{plugin}"
+    ]
+  }
+}