lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject lucene-solr:apiv2: SOLR-8029: Added more details to config API
Date Thu, 20 Oct 2016 19:10:07 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/apiv2 4e879baf9 -> c482b339e


SOLR-8029: Added more details to config API


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

Branch: refs/heads/apiv2
Commit: c482b339e7813e3b39593bda7c498ecefc547e05
Parents: 4e879ba
Author: Noble Paul <noble@apache.org>
Authored: Fri Oct 21 00:39:48 2016 +0530
Committer: Noble Paul <noble@apache.org>
Committed: Fri Oct 21 00:39:48 2016 +0530

----------------------------------------------------------------------
 .../apispec/core.config.Commands.generic.json   |  10 ++
 .../resources/apispec/core.config.Commands.json | 169 ++++++++++---------
 .../org/apache/solr/util/JsonValidatorTest.java |   2 +-
 3 files changed, 104 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c482b339/solr/core/src/resources/apispec/core.config.Commands.generic.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/core.config.Commands.generic.json b/solr/core/src/resources/apispec/core.config.Commands.generic.json
new file mode 100644
index 0000000..51b8fdf
--- /dev/null
+++ b/solr/core/src/resources/apispec/core.config.Commands.generic.json
@@ -0,0 +1,10 @@
+{
+  "type": "object",
+  "properties": {
+    "name": { "type": "string"},
+    "class": { "type": "string"},
+    "runtimeLib": { "type": "boolean"}
+  },
+  "required": [ "name", "class"],
+  "additionalProperties": true
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c482b339/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
index e4d8cdc..0be10d0 100644
--- a/solr/core/src/resources/apispec/core.config.Commands.json
+++ b/solr/core/src/resources/apispec/core.config.Commands.json
@@ -22,27 +22,67 @@
     },
     "add-requesthandler": {
       "type": "object",
+      "properties": {
+        "name": {
+          "type": "string"
+        },
+        "class": {
+          "type": "string"
+        },
+        "runtimeLib": {
+          "type": "boolean"
+        },
+        "startup": {
+          "type": "string",
+          "enum": [
+            "lazy"
+          ]
+        }
+      },
+      "required": [
+        "name",
+        "class"
+      ],
       "additionalProperties": true
     },
     "update-requesthandler": {
       "type": "object",
+      "properties": {
+        "name": {
+          "type": "string"
+        },
+        "class": {
+          "type": "string"
+        },
+        "runtimeLib": {
+          "type": "boolean"
+        },
+        "startup": {
+          "type": "string",
+          "enum": [
+            "lazy"
+          ]
+        }
+      },
+      "required": [
+        "name",
+        "class"
+      ],
       "additionalProperties": true
     },
     "delete-requesthandler": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-searchcomponent": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-searchcomponent": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
+    "add-searchcomponent": "core.config.Commands.generic",
+    "update-searchcomponent": "core.config.Commands.generic",
     "delete-searchcomponent": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
     "add-initparams": {
       "type": "object",
@@ -53,80 +93,55 @@
       "additionalProperties": true
     },
     "delete-initparams": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-queryresponsewriter": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-queryresponsewriter": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
+    "add-queryresponsewriter": "core.config.Commands.generic",
+    "update-queryresponsewriter": "core.config.Commands.generic",
     "delete-queryresponsewriter": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-queryparser": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-queryparser": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
+    "add-queryparser": "core.config.Commands.generic",
+    "update-queryparser": "core.config.Commands.generic",
     "delete-queryparser": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-valuesourceparser": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-valuesourceparser": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "string"
     },
+    "add-valuesourceparser": "core.config.Commands.generic",
+    "update-valuesourceparser": "core.config.Commands.generic",
     "delete-valuesourceparser": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-transformer": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-transformer": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
+    "add-transformer": "core.config.Commands.generic",
+    "update-transformer": "core.config.Commands.generic",
     "delete-transformer": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-updateprocessor": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-updateprocessor": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
+    "add-updateprocessor": "core.config.Commands.generic",
+    "update-updateprocessor": "core.config.Commands.generic",
     "delete-updateprocessor": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "add-queryconverter": {
-      "type": "object",
-      "additionalProperties": true
-    },
-    "update-queryconverter": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
+    "add-queryconverter": "core.config.Commands.generic",
+    "update-queryconverter": "core.config.Commands.generic",
     "delete-queryconverter": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
     "add-listener": {
       "type": "object",
@@ -137,8 +152,10 @@
       "additionalProperties": true
     },
     "delete-listener": {
-      "type": "object",
-      "additionalProperties": true
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
     },
     "add-runtimelib": "core.config.Commands.addRuntimeLib",
     "update-runtimelib": "core.config.Commands.updateRuntimeLib",

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c482b339/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java b/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
index f142eb5..3db94ab 100644
--- a/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
+++ b/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
@@ -43,7 +43,7 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {
     checkSchema("cluster.security.RuleBasedAuthorization");
     checkSchema("core.config.Commands");
     checkSchema("core.SchemaEdit");
-    checkSchema("cluster.config.Commands");
+    checkSchema("cluster.configs.Commands");
   }
 
 


Mime
View raw message