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 2017/06/08 10:10:07 UTC

[2/4] lucene-solr:master: SOLR-10647: move the spec files to solrj

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java b/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java
new file mode 100644
index 0000000..b02a323
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.common.util;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.solr.common.util.StrUtils;
+
+import static java.util.Collections.emptyList;
+
+/**A utility class to efficiently parse/store/lookup hierarchical paths which are templatized
+ * like /collections/{collection}/shards/{shard}/{replica}
+ */
+public class PathTrie<T> {
+  private final Set<String> reserved = new HashSet<>();
+  Node root = new Node(emptyList(), null);
+
+  public PathTrie() { }
+
+  public PathTrie(Set<String> reserved) {
+    this.reserved.addAll(reserved);
+  }
+
+
+
+  public void insert(String path, Map<String, String> replacements, T o) {
+    List<String> parts = getPathSegments(path);
+    insert(parts,replacements, o);
+  }
+
+  public void insert(List<String> parts, Map<String, String> replacements, T o) {
+    if (parts.isEmpty()) {
+      root.obj = o;
+      return;
+    }
+
+    for (int i = 0; i < parts.size(); i++) {
+      String part = parts.get(i);
+      if (part.charAt(0) == '$') {
+        String replacement = replacements.get(part.substring(1));
+        if (replacement == null) {
+          throw new RuntimeException(part + " is not provided");
+        }
+        replacement = replacement.charAt(0) == '/' ? replacement.substring(1) : replacement;
+        parts.set(i, replacement);
+      }
+    }
+
+    root.insert(parts, o);
+  }
+
+  // /a/b/c will be returned as ["a","b","c"]
+  public static List<String> getPathSegments(String path) {
+    if (path == null || path.isEmpty()) return emptyList();
+    List<String> parts = new ArrayList<String>() {
+      @Override
+      public boolean add(String s) {
+        if (s == null || s.isEmpty()) return false;
+        return super.add(s);
+      }
+    };
+    StrUtils.splitSmart(path, '/', parts);
+    return parts;
+  }
+
+
+  public T lookup(String path, Map<String, String> templateValues) {
+    return root.lookup(getPathSegments(path), 0, templateValues);
+  }
+
+  public T lookup(List<String> path, Map<String, String> templateValues) {
+    return root.lookup(path, 0, templateValues);
+  }
+
+  public T lookup(String path, Map<String, String> templateValues, Set<String> paths) {
+    return root.lookup(getPathSegments(path), 0, templateValues, paths);
+  }
+
+  public static String templateName(String templateStr) {
+    return templateStr.startsWith("{") && templateStr.endsWith("}") ?
+        templateStr.substring(1, templateStr.length() - 1) :
+        null;
+
+  }
+
+  class Node {
+    String name;
+    Map<String, Node> children;
+    T obj;
+    String templateName;
+
+    Node(List<String> path, T o) {
+      if (path.isEmpty()) {
+        obj = o;
+        return;
+      }
+      String part = path.get(0);
+      templateName = templateName(part);
+      name = part;
+      if (path.isEmpty()) obj = o;
+    }
+
+
+    private synchronized void insert(List<String> path, T o) {
+      String part = path.get(0);
+      Node matchedChild = null;
+      if (children == null) children = new ConcurrentHashMap<>();
+
+      String varName = templateName(part);
+      String key = varName == null ? part : "";
+
+      matchedChild = children.get(key);
+      if (matchedChild == null) {
+        children.put(key, matchedChild = new Node(path, o));
+      }
+      if (varName != null) {
+        if (!matchedChild.templateName.equals(varName)) {
+          throw new RuntimeException("wildcard name must be " + matchedChild.templateName);
+        }
+      }
+      path.remove(0);
+      if (!path.isEmpty()) {
+        matchedChild.insert(path, o);
+      } else {
+        matchedChild.obj = o;
+      }
+
+    }
+
+
+    void findAvailableChildren(String path, Set<String> availableSubPaths) {
+      if (availableSubPaths == null) return;
+      if (children != null) {
+        for (Node node : children.values()) {
+          if (node.obj != null) {
+            String s = path + "/" + node.name;
+            availableSubPaths.add(s);
+          }
+        }
+
+        for (Node node : children.values()) {
+          node.findAvailableChildren(path + "/" + node.name, availableSubPaths);
+        }
+      }
+    }
+
+
+    public T lookup(List<String> pieces, int i, Map<String, String> templateValues) {
+      return lookup(pieces, i, templateValues, null);
+
+    }
+
+    /**
+     *
+     * @param pathSegments pieces in the url /a/b/c has pieces as 'a' , 'b' , 'c'
+     * @param index current index of the pieces that we are looking at in /a/b/c 0='a' and 1='b'
+     * @param templateVariables The mapping of template variable to its value
+     * @param availableSubPaths If not null , available sub paths will be returned in this set
+     */
+    public T lookup(List<String> pathSegments, int index, Map<String, String> templateVariables, Set<String> availableSubPaths) {
+      if (templateName != null) templateVariables.put(templateName, pathSegments.get(index - 1));
+      if (pathSegments.size() < index + 1) {
+        findAvailableChildren("", availableSubPaths);
+        return obj;
+      }
+      String piece = pathSegments.get(index);
+      if (children == null) return null;
+      Node n = children.get(piece);
+      if (n == null && !reserved.contains(piece)) n = children.get("");
+      if (n == null) return null;
+      return n.lookup(pathSegments, index + 1, templateVariables, availableSubPaths);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
index ce2c305..b64f971 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
@@ -42,8 +42,10 @@ import org.apache.http.util.EntityUtils;
 import org.apache.solr.common.IteratorWriter;
 import org.apache.solr.common.MapWriter;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.SpecProvider;
 import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.cloud.ZkOperation;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.zookeeper.KeeperException;
 import org.noggit.CharArr;
 import org.noggit.JSONParser;
@@ -302,4 +304,10 @@ public class Utils {
 
   public static final Pattern ARRAY_ELEMENT_INDEX = Pattern
       .compile("(\\S*?)\\[(\\d+)\\]");
+
+  public static SpecProvider getSpec(final String name) {
+    return () -> {
+      return ValidatingJsonMap.parse(CommonParams.APISPEC_LOCATION + name + ".json", CommonParams.APISPEC_LOCATION);
+    };
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/autoscaling.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/autoscaling.Commands.json b/solr/solrj/src/resources/apispec/autoscaling.Commands.json
new file mode 100644
index 0000000..5ff89ef
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/autoscaling.Commands.json
@@ -0,0 +1,47 @@
+{
+  "documentation": "TODO NOCOMMIT",
+  "description": "The Scaling API provides API for adding cluster level scaling rules, triggers and event listeners",
+  "methods": [
+    "GET",
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/autoscaling",
+      "/cluster/autoscaling/diagnostics"
+    ]
+  },
+  "commands": {
+    "set-policy" : {
+      "type":"object",
+      "description": "The set-policy command allows you to add and update policies that apply to collections",
+    /*  "patternProperties": {
+        "^.+$": {
+          "type": "array"
+        }
+      },*/
+      "additionalProperties": true
+    },
+    "set-cluster-policy" : {
+      "type" : "array",
+      "description" : "The set-cluster-policy command allows you to add and update cluster-level policy that acts as the base for all collection level policies, if any"
+    },
+    "set-cluster-preferences" : {
+      "type" : "array",
+      "description" : "The set-cluster-preferences command allows you to add and update cluster-level preferences that are used to sort nodes for selection in cluster operations"
+    },
+    "remove-policy": {
+      "description": "Remove a policy",
+      "type": "object",
+      "properties": {
+        "name": {
+          "type": "string",
+          "description": "The name of the policy to be removed"
+        }
+      },
+      "required": [
+        "name"
+      ]
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.Commands.json b/solr/solrj/src/resources/apispec/cluster.Commands.json
new file mode 100644
index 0000000..88f8c06
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.Commands.json
@@ -0,0 +1,74 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Cluster-wide commands to assign roles to nodes, remove role assignments, or add, edit or remove a cluster-wide property.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster"
+    ]
+  },
+  "commands": {
+    "add-role":{
+      "type":"object",
+      "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api15",
+      "description":"Assign a specific role to a node in the cluster.",
+      "properties": {
+        "role": {
+          "type": "string",
+          "description": "The name of the role. The only supported role is 'overseer'."
+
+        },
+        "node": {
+          "type": "string",
+          "description": "The name of the node. It is possible to assign a role even before that node is started."
+
+        }
+      },
+      "required": [
+        "role",
+        "node"
+      ]
+    },
+    "remove-role":{
+      "type":"object",
+      "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api16",
+      "description":"Unassign a role from a node in the cluster.",
+      "properties": {
+        "role": {
+          "type": "string",
+          "description": "The name of the role. The only supported role as of now is 'overseer'."
+
+        },
+        "node": {
+          "type": "string",
+          "description": "The name of the node where the role should be removed."
+        }
+      },
+      "required": [
+        "role",
+        "node"
+      ]
+    },
+    "set-property": {
+      "type": "object",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api11",
+      "description": "Add, edit, or delete a cluster-wide property.",
+      "properties": {
+        "name": {
+          "type": "string",
+          "description": "The name of the property"
+        },
+        "val": {
+          "type": ["string","boolean","null"],
+          "description": "The value of the property. If the value is empty or null, the property is unset."
+        }
+      },
+      "required": [
+        "name",
+        "val"
+      ]
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.aliases.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.aliases.json b/solr/solrj/src/resources/apispec/cluster.aliases.json
new file mode 100644
index 0000000..9cffb71
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.aliases.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Provides list of collection alises.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/aliases"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.commandstatus.delete.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.commandstatus.delete.json b/solr/solrj/src/resources/apispec/cluster.commandstatus.delete.json
new file mode 100644
index 0000000..5576c42
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.commandstatus.delete.json
@@ -0,0 +1,10 @@
+{
+  "methods": [
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/command-status/{id}"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.commandstatus.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.commandstatus.json b/solr/solrj/src/resources/apispec/cluster.commandstatus.json
new file mode 100644
index 0000000..a8a402b
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.commandstatus.json
@@ -0,0 +1,20 @@
+{
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/command-status"
+    ],
+    "params": {
+      "flush": {
+        "type": "boolean",
+        "default": false
+      },
+      "id":{
+        "type":"string",
+        "description": "The command id"
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.configs.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.configs.Commands.json b/solr/solrj/src/resources/apispec/cluster.configs.Commands.json
new file mode 100644
index 0000000..d026cd5
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.configs.Commands.json
@@ -0,0 +1,34 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/ConfigSets+API",
+  "description": "Create ConfigSets.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/configs"]
+  },
+  "commands": {
+    "create": {
+      "type" :"object",
+      "description": "Create a ConfigSet, based on another ConfigSet already in ZooKeeper.",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/ConfigSets+API#ConfigSetsAPI-create",
+      "properties": {
+        "name" :{
+          "type" :"string",
+          "description" : "The name of the ConfigSet to be created."
+        },
+        "baseConfigSet":{
+          "type" : "string",
+          "description" :"The existing ConfigSet to copy as the basis for the new one."
+        },
+        "properties" : {
+          "type":"object",
+          "description": "Additional key-value pairs, in the form of 'ConfigSetProp.<key>=<value>', as needed. These properties will override the same properties in the base ConfigSet.",
+          "additionalProperties" : true
+        }
+      },
+      "required" : ["name", "baseConfigSet"]
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.configs.delete.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.configs.delete.json b/solr/solrj/src/resources/apispec/cluster.configs.delete.json
new file mode 100644
index 0000000..236d457
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.configs.delete.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/ConfigSets+API#ConfigSetsAPI-delete",
+  "description": "Delete ConfigSets. The name of the ConfigSet to delete must be provided as a path parameter.",
+  "methods": [
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/configs/{name}"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.configs.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.configs.json b/solr/solrj/src/resources/apispec/cluster.configs.json
new file mode 100644
index 0000000..9a1443a
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.configs.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/ConfigSets+API#ConfigSetsAPI-list",
+  "description": "List all ConfigSets in the cluster.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/configs"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.json b/solr/solrj/src/resources/apispec/cluster.json
new file mode 100644
index 0000000..0ec5b96
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.json
@@ -0,0 +1,14 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "General information about the cluster, including defined collections (with the 'cluster' endpoint), status of the overseer (with the 'cluster/overseer' endpoint), and available nodes (with the 'cluster/nodes' endpoint).",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster",
+      "/cluster/overseer",
+      "/cluster/nodes"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.nodes.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.nodes.json b/solr/solrj/src/resources/apispec/cluster.nodes.json
new file mode 100644
index 0000000..f992f7f
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.nodes.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Provides general information about the available nodes of the cluster.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/nodes"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.json
new file mode 100644
index 0000000..da04c85
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.json
@@ -0,0 +1,23 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin",
+  "description": "Modifies the configuration of Basic authentication, allowing you to add or remove users and their passwords.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/security/authentication"
+    ]
+  },
+  "commands": {
+    "set-user": {
+      "type":"object",
+      "description": "The set-user command allows you to add users and change their passwords. Usernames and passwords are expressed as key-value pairs in a JSON object.",
+      "additionalProperties": true
+    },
+    "delete-user": {
+      "description": "Delete a user or a list of users. Passwords do not need to be provided, simply list the users in a JSON array, separated by colons.",
+      "type":"string"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.json b/solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.json
new file mode 100644
index 0000000..eb9a11c
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.json
@@ -0,0 +1,129 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Rule-Based+Authorization+Plugin",
+  "description": "Defines roles for accessing Solr, and assigns users to those roles. Use this API to change user authorizations to each of Solr's components.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/security/authorization"
+    ]
+  },
+  "commands": {
+    "set-permission": {
+      "type":"object",
+      "description": "Create a new permission, overwrite an existing permission definition, or assign a pre-defined permission to a role.",
+      "properties": {
+        "name":{
+          "type":"string",
+          "description": "The name of the permission. The name will be used to update or delete the permission later."
+        },
+        "method":{
+          "type":"string",
+          "enum":["GET", "POST", "DELETE","PUT"],
+          "description": "HTTP methods that are allowed for this permission. You could allow only GET requests, or have a role that allows PUT and POST requests. The method values that are allowed for this property are GET, POST, PUT, DELETE and HEAD."
+        },
+
+        "collection":{
+          "type":"array",
+          "items": {
+            "type": "string"
+          },
+          "description":"The collection or collections the permission will apply to. When the path that will be allowed is collection-specific, such as when setting permissions to allow use of the Schema API, omitting the collection property will allow the defined path and/or method for all collections. However, when the path is one that is non-collection-specific, such as the Collections API, the collection value must be null. In this case, two permissions may need to be created; one for collection-specific API paths allowing access to all collections, and another for non-collection-specific paths defining no collection limitations."
+        },
+
+        "path":{
+          "type":"array",
+          "items": {
+            "type": "string"
+          },
+          "description":"A request handler name, such as /update or /select. A wild card is supported, to allow for all paths as appropriate (such as, /update/*)."
+        },
+        "index": {
+          "type": "integer",
+          "description": "The index of the permission you wish to overwrite. Skip this if it is a new permission that should be created."
+        },
+        "before":{
+          "type": "integer",
+          "description":"This property allows ordering of permissions. The value for this property is the name of the permission that this new permission should be placed before in security.json."
+        },
+        "params":{
+          "type":"object",
+          "additionalProperties":true,
+          "description": "The names and values of request parameters. This property can be omitted if all request parameters are allowed, but will restrict access only to the values provided if defined."
+        },
+        "role": {
+          "type": "array",
+          "items": {
+            "type": "string",
+            "description": "The name of the role(s) to give this permission. This name will be used to map user IDs to the role to grant these permissions. The value can be wildcard such as (*), which means that any user is OK, but no user is NOT OK."
+          }
+        }
+      },
+      "required": [
+        "role"
+      ]
+    },
+    "update-permission": {
+      "type":"object",
+      "properties": {
+        "name": {
+          "type": "string",
+          "description": "The name of the permission. The name will be used to update or delete the permission later."
+        },
+        "method": {
+          "type": "string",
+          "description": "HTTP methods that are allowed for this permission. You could allow only GET requests, or have a role that allows PUT and POST requests. The method values that are allowed for this property are GET, POST, PUT, DELETE and HEAD."
+        },
+        "collection": {
+          "type":"array",
+          "items": {
+            "type": "string"
+          },
+          "description": "The collection or collections the permission will apply to. When the path that will be allowed is collection-specific, such as when setting permissions to allow use of the Schema API, omitting the collection property will allow the defined path and/or method for all collections. However, when the path is one that is non-collection-specific, such as the Collections API, the collection value must be null. In this case, two permissions may need to be created; one for collection-specific API paths allowing access to all collections, and another for non-collection-specific paths defining no collection limitations."
+        },
+        "path": {
+          "type":"array",
+          "items": {
+            "type": "string"
+          },
+          "description": "A request handler name, such as /update or /select. A wild card is supported, to allow for all paths as appropriate (such as, /update/*)."
+        },
+        "index": {
+          "type": "integer",
+          "description": "The index of the permission you wish to overwrite."
+        },
+        "before": {
+          "type": "integer",
+          "description": "This property allows ordering of permissions. The value for this property is the index of the permission that this new permission should be placed before in security.json."
+        },
+        "role": {
+          "type": "array",
+          "items": {
+            "type": "string",
+            "description": "The name of the role(s) to give this permission. This name will be used to map user IDs to the role to grant these permissions. The value can be wildcard such as (*), which means that any user is OK, but no user is NOT OK."
+          }
+        },
+        "params": {
+          "type": "object",
+          "additionalProperties": true,
+          "description": "The names and values of request parameters. This property can be omitted if all request parameters are allowed, but will restrict access only to the values provided if defined."
+        }
+      },
+      "required": [
+        "role",
+        "index"
+      ]
+    },
+    "delete-permission":{
+      "description":"delete a permission by its index",
+      "type":"integer"
+    },
+    "set-user-role": {
+      "type":"object",
+      "description": "A single command allows roles to be mapped to users. To remove a user's permission, you should set the role to null. The key is always a user id and the value is one or more role names.",
+      "additionalProperties":true
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.json
new file mode 100644
index 0000000..e1f9030
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Securing+Solr",
+  "description":"This is a placeholder output when no authentication is configured",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/security/authentication"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.security.authentication.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.security.authentication.json b/solr/solrj/src/resources/apispec/cluster.security.authentication.json
new file mode 100644
index 0000000..48757c3
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.security.authentication.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Authentication+and+Authorization+Plugins",
+  "description": "Shows the configuration for authentication, including users, classes (type of authentication) and other parameters.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/security/authentication"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.json
new file mode 100644
index 0000000..fe74065
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.json
@@ -0,0 +1,13 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Securing+Solr",
+  "description":"This is a placeholder output when no authorization is configured",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/security/authorization"
+    ]
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/cluster.security.authorization.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/cluster.security.authorization.json b/solr/solrj/src/resources/apispec/cluster.security.authorization.json
new file mode 100644
index 0000000..da09f8a
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/cluster.security.authorization.json
@@ -0,0 +1,13 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Authentication+and+Authorization+Plugins",
+  "description":"Shows the configuration for authorization, including the classes (type of authorization), permissions, user-roles, and other parameters.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/security/authorization"
+    ]
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.Commands.json b/solr/solrj/src/resources/apispec/collections.Commands.json
new file mode 100644
index 0000000..13a75c0
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.Commands.json
@@ -0,0 +1,218 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1",
+  "description": "Create collections and collection aliases, backup or restore collections, and delete collections and aliases.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/collections",
+      "/c"
+    ]
+  },
+  "commands": {
+    "create": {
+      "type": "object",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1",
+      "description": "Create a collection.",
+      "properties": {
+        "name": {
+          "type": "string",
+          "description": "The name of the collection to be created."
+        },
+        "config": {
+          "type": "string",
+          "description": "The name of the configuration set (which must already be stored in ZooKeeper) to use for this collection. If not provided, Solr will default to the collection name as the configuration set name."
+        },
+        "router": {
+          "type": "object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Shards+and+Indexing+Data+in+SolrCloud",
+          "description": "These properties define how to distribute documents across a collection's shards.",
+          "properties": {
+            "name": {
+              "type": "string",
+              "enum":["implicit","compositeId"],
+              "description": "The router implementation to use for this collection. There are two options: compositeId or implicit. The compositeId option has Solr decide how to distribute documents (with some possibilities for customization). The implicit option requires you define your own routing strategy, and puts the balancing of documents in shards entirely in your hands.",
+              "default": "compositeId"
+            },
+            "field": {
+              "type": "string",
+              "description": "A field to be used by Solr to identify the shard a document should be routed to. By default, the field defined as the unique ID for each document is used, but an alternative field can be defined with this parameter."
+            }
+          }
+        },
+        "numShards": {
+          "type": "integer",
+          "description": "The number of shards to be created as part of the collection. Shards are logical partitions of a single collection. Each shard has at least one replica, but more replicas for each shard can be defined with the replicationFactor property. This is a required parameter when using the 'compositeId' router."
+        },
+        "shards": {
+          "type": "string",
+          "description": "A comma-separated list of shard names, e.g., shard-x,shard-y,shard-z. This is a required parameter when using the 'implicit' router."
+        },
+        "replicationFactor": {
+          "type": "integer",
+          "description": "The number of NRT replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard."
+        },
+        "nrtReplicas": {
+          "type": "integer",
+          "description": "The number of NRT replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard. Replicas of type NRT will be updated with each document that is added to the cluster, and can use \"softCommits\" to get a new view of the index in Near Real Time. This parameter works in the same way as 'replicationFactor'"
+        },
+        "tlogReplicas": {
+          "type": "integer",
+          "description": "The number of TLOG replicas to be created for each shard. TLOG replicas update their transaction log for every update to the cluster, but only the shard leader updates the local index, other TLOG replicas will use segment replication and copy the latest index files from the leader."
+        },
+        "pullReplicas": {
+          "type": "integer",
+          "description": "The number of PULL replicas to be created for each shard. PULL replicas don't receive copies of the documents on update requests, they just replicate the latest segments periodically from the shard leader. PULL replicas can't become shard leaders, and need at least one active TLOG(recommended) or NRT replicas in the shard to replicate from."
+        },
+        "nodeSet": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          },
+          "description": "Defines nodes to spread the new collection across. If not provided, the collection will be spread across all live Solr nodes. The names to use are the 'node_name', which can be found by a request to the cluster/nodes endpoint. A special value of EMPTY will create no shards or replicas for the new collection. In this case, shards and replicas can be added later with the add-replica command available on the /collections/{collection}/shards endpoint."
+        },
+        "shuffleNodes": {
+          "type": "boolean",
+          "description": "Controls whether or not the shard-replicas created for this collection will be assigned to the nodes specified by the nodeSet property in a sequential manner, or if the list of nodes should be shuffled prior to creating individual replicas. A 'false' value makes the results of a collection creation predictable and gives more exact control over the location of the individual shard-replicas, but 'true' can be a better choice for ensuring replicas are distributed evenly across nodes. This property is ignored if nodeSet is not also specified."
+        },
+        "maxShardsPerNode": {
+          "type": "integer",
+          "description": "When creating collections, the shards and/or replicas are spread across all available, live, nodes, and two replicas of the same shard will never be on the same node. If a node is not live when the collection is created, it will not get any parts of the new collection, which could lead to too many replicas being created on a single live node. Defining maxShardsPerNode sets a limit on the number of replicas can be spread to each node. If the entire collection can not be fit into the live nodes, no collection will be created at all."
+        },
+        "autoAddReplicas": {
+          "type": "boolean",
+          "description": "When set to true, enables auto addition of replicas on shared file systems (such as HDFS). See https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+HDFS for more details on settings and overrides.",
+          "default": "false"
+        },
+        "rule": {
+          "type": "array",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Rule-based+Replica+Placement",
+          "description": "Defines rules for where replicas should be located in a cluster.",
+          "items": {
+            "type": "string"
+          }
+        },
+        "snitch": {
+          "type": "array",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Rule-based+Replica+Placement",
+          "description": "",
+          "items": {
+            "type": "string"
+          }
+        },
+        "properties": {
+          "type": "object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples of core properties you may want to modify include the config set, the node name, the data directory, among others.",
+          "additionalProperties": true
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously."
+        }
+      },
+      "required": [
+        "name"
+      ]
+    },
+    "create-alias": {
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api4",
+      "description": "Allows one or more collections to be known by another name. If this command is used on an existing alias, the existing alias will be replaced with the new collection details.",
+      "type": "object",
+      "properties": {
+        "name": {
+          "type": "string",
+          "description": "The alias name to be created."
+        },
+        "collections": {
+          "type": "array",
+          "description": "The list of collections to be known as this alias.",
+          "items": {
+            "type": "string"
+          }
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously."
+        }
+      },
+      "required": [
+        "name",
+        "collections"
+      ]
+    },
+    "delete-alias": {
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api5",
+      "description": "Deletes a collection alias",
+      "type": "object",
+      "properties": {
+        "name": {
+          "type": "string",
+          "description": "The name of the alias to delete."
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously."
+        }
+      },
+      "required":["name"]
+    },
+    "backup-collection": {
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-Backup",
+      "description": "Backup Solr indexes and configurations for a specific collection. One copy of the indexes will be taken from each shard, and the config set for the collection will also be copied.",
+      "type": "object",
+      "properties": {
+        "collection": {
+          "type": "string",
+          "description": "The name of the collection to back up."
+        },
+        "name": {
+          "type": "string",
+          "description": "The name of the backup."
+        },
+        "location": {
+          "type": "string",
+          "description": "A location on a shared drive for the backup-collection command to write to. Alternately, it can be set as a cluster property with the cluster endpoint, which also supports setting a location."
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously."
+        }
+      },
+      "required": [
+        "collection",
+        "name",
+        "location"
+      ]
+    },
+    "restore-collection": {
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-Restore",
+      "description": "Restore Solr indexes and configurations from a backup. You cannot restore into the same collection you took the backup from. The target collection must not exist before calling this command, as it will be created by the restore action. The new collection will have the same number of shards and replicas as the original collection, and all routing strategies will be retained.",
+      "type": "object",
+      "properties": {
+        "collection": {
+          "type": "string",
+          "description": "The name of the collection the backup will be restored to. This collection must not exist prior to this "
+        },
+        "name": {
+          "type": "string",
+          "description": "The name of the backup file."
+        },
+        "location": {
+          "type": "string",
+          "description": "The location on the shared drive for the restore-collection command to read from. Alternately, it can be set as a cluster property with the cluster endpoint, which also supports setting a location."
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously."
+        }
+      },
+      "required": [
+        "collection",
+        "name",
+        "location"
+      ]
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.json
new file mode 100644
index 0000000..e749347
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.Commands.json
@@ -0,0 +1,137 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Several collection-level operations are supported with this endpoint: modify collection attributes; reload a collection; migrate documents to a different collection; rebalance collection leaders; balance properties across shards; and add or delete a replica property.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}",
+      "/c/{collection}"
+    ]
+  },
+  "commands": {
+    "modify": {
+      "#include": "collections.collection.Commands.modify"
+    },
+    "reload": {
+      "#include": "collections.collection.Commands.reload"
+    },
+    "migrate-docs":{
+      "type":"object",
+      "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12",
+      "description": "Moves documents with a given routing key to another collection. The source collection will continue to have the same documents, but will start re-routing write requests to the new collection. This command only works on collections using the 'compositeId' type of document routing.",
+      "properties":{
+        "target":{
+          "type":"string",
+          "description":"The name of the collection to which documents will be migrated."
+        },
+        "splitKey":{
+          "type":"string",
+          "description":"The routing key prefix. For example, if uniqueKey is a!123, then you would use split.key=a! This key may span multiple shards on source and target collections. The migration will be completed shard-by-shard in a single thread."
+        },
+        "forwardTimeout":{
+          "type":"integer",
+          "description":"The timeout, in seconds, until which write requests made to the source collection for the given splitKey will be forwarded to the target shard. Once this time is up, write requests will be routed to the target collection. Any applications sending read or write requests should be modified once the migration is complete to send documents to the right collection.",
+          "default": "60"
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined. This command can be long-running, so running it asynchronously is recommended."
+        }
+      },
+      "required":["target", "splitKey"]
+    },
+    "balance-shard-unique":{
+      "type":"object",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-BalanceSliceUnique",
+      "description": "Insures a property is distributed equally across all physical nodes of a collection. If the property already exists on a replica, effort is made to leave it there. However, if it does not exist on any repica, a shard will be chosen and the property added.",
+      "properties":{
+        "property":{
+          "type":"string",
+          "description": "The property to balance across nodes. This can be entered as 'property.<property>' or simply '<property>'. If the 'property.' prefix is not defined, it will be added automatically."
+       },
+        "onlyactivenodes":{
+          "type":"boolean",
+          "description": "Normally, a property is instantiated on active nodes only. If this parameter is specified as 'false', then inactive nodes are also included for distribution.",
+          "default": "true"
+        },
+        "shardUnique":{
+          "type":"boolean",
+          "description": "There is one pre-defined property (preferredLeader) that defaults this value to 'true'. For all other properties that are balanced, this must be set to 'true' or an error message is returned."
+        }
+      },
+      "required":["property"]
+    },
+    "rebalance-leaders" :{
+      "type":"object",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-RebalanceLeaders",
+      "description": "Reassign leaders in a collection according to the preferredLeader property across active nodes. This command should be run after the preferredLeader property has been set with the balance-shards or add-replica-property commands.",
+      "properties":{
+        "maxAtOnce":{
+          "type":"integer",
+          "description":"The maximum number of reassignments to have in the queue at one time. Values <=0 use the default value Integer.MAX_VALUE. When this number is reached, the process waits for one or more leaders to be successfully assigned before adding more to the queue."
+        },
+        "maxWaitSeconds":{
+          "type":"integer",
+          "description":"Timeout, in seconds, when waiting for leaders to be reassigned. If maxAtOnce is less than the number of reassignments pending, this is the maximum interval for any single reassignment.",
+          "default": "60"
+        }
+      }
+    },
+    "add-replica-property": {
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-AddReplicaProp",
+      "description": "Assign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value.",
+      "type": "object",
+      "properties": {
+        "shard": {
+          "type": "string",
+          "description": "The name of the shard the replica belongs to."
+        },
+        "replica": {
+          "type": "string",
+          "description": "The name of the replica."
+        },
+        "name": {
+          "type": "string",
+          "description": "The name of the property. This can be entered as 'property.<property>' or simply '<property>'. If the 'property.' prefix is not defined, it will be added automatically."
+        },
+        "value": {
+          "type": "string",
+          "description": "The value to assign to the property."
+        },
+        "shardUnique": {
+          "type": "boolean",
+          "description": "If true, setting this property in one replica will remove the property from all other replicas in that shard.",
+          "default": "false"
+        }
+      },
+      "required": [
+        "name",
+        "value",
+        "shard",
+        "replica"
+      ]
+    },
+    "delete-replica-property": {
+      "description": "Deletes an arbitrary property from a particular replica",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-DeleteReplicaProp",
+      "type": "object",
+      "properties": {
+        "shard": {
+          "type": "string",
+          "description": "The name of the shard the replica belongs to."
+        },
+        "replica": {
+          "type": "string",
+          "description": "The name of the replica."
+        },
+        "property": {
+          "type": "string",
+          "description": "The name of the property to remove."
+        }
+      },
+      "required":["shard","replica","property"]
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
new file mode 100644
index 0000000..d7d0f10
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
@@ -0,0 +1,36 @@
+{
+  "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-modifycoll",
+  "description":"Modifies specific attributes of a collection. Multiple attributes can be changed at one time.",
+  "type": "object",
+  "properties":{
+    "rule": {
+      "type": "array",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Rule-based+Replica+Placement",
+      "description": "Modifies the rules for where replicas should be located in a cluster.",
+      "items": {
+        "type": "string"
+      }
+    },
+    "snitch": {
+      "type": "array",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Rule-based+Replica+Placement",
+      "description": "Details of the snitch provider",
+      "items": {
+        "type": "string"
+      }
+    },
+    "autoAddReplicas": {
+      "type": "boolean",
+      "description": "When set to true, enables auto addition of replicas on shared file systems (such as HDFS). See https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+HDFS for more details on settings and overrides."
+    },
+    "replicationFactor": {
+      "type": "integer",
+      "description": "The number of replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard. Note that changing this value on an existing collection does not automatically add more replicas to the collection. However, it will allow add-replica commands to succeed."
+    },
+    "maxShardsPerNode": {
+      "type": "integer",
+      "description": "When creating collections, the shards and/or replicas are spread across all available, live, nodes, and two replicas of the same shard will never be on the same node. If a node is not live when the collection is created, it will not get any parts of the new collection, which could lead to too many replicas being created on a single live node. Defining maxShardsPerNode sets a limit on the number of replicas can be spread to each node. If the entire collection can not be fit into the live nodes, no collection will be created at all."
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.Commands.reload.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.Commands.reload.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.reload.json
new file mode 100644
index 0000000..fe7e379
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.Commands.reload.json
@@ -0,0 +1,11 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api2",
+  "description": "Reloads a collection so new configuration changes can take effect and be available for use by the system.",
+  "type" : "object",
+  "properties":{
+    "async": {
+      "type": "string",
+      "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined."
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.delete.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.delete.json b/solr/solrj/src/resources/apispec/collections.collection.delete.json
new file mode 100644
index 0000000..0ab4562
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.delete.json
@@ -0,0 +1,13 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api6",
+  "description": "Deletes a collection.",
+  "methods": [
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}",
+      "/c/{collection}"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.json b/solr/solrj/src/resources/apispec/collections.collection.json
new file mode 100644
index 0000000..34008be
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.json
@@ -0,0 +1,19 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1",
+  "description": "Lists all collections, with details on shards and replicas in each collection.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}",
+      "/c/{collection}",
+      "/collections/{collection}/shards",
+      "/c/{collection}/shards",
+      "/collections/{collection}/shards/{shard}",
+      "/c/{collection}/shards/{shard}",
+      "/collections/{collection}/shards/{shard}/{replica}",
+      "/c/{collection}/shards/{shard}/{replica}"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.shards.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.shards.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.shards.Commands.json
new file mode 100644
index 0000000..4750e2c
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.shards.Commands.json
@@ -0,0 +1,114 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Allows you to create a shard, split an existing shard or add a new replica.",
+  "methods": [
+    "POST"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}/shards",
+      "/c/{collection}/shards"
+    ]
+  },
+  "commands": {
+    "split": {
+      "type" : "object",
+      "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api3",
+      "description": "Splits an existing shard into two or more new shards. During this action, the existing shard will continue to contain the original data, but new data will be routed to the new shards once the split is complete. New shards will have as many replicas as the existing shards. A soft commit will be done automatically. An explicit commit request is not required because the index is automatically saved to disk during the split operation. New shards will use the original shard name as the basis for their names, adding an underscore and a number to differentiate the new shard. For example, 'shard1' would become 'shard1_0' and 'shard1_1'. Note that this operation can take a long time to complete.",
+      "properties": {
+        "shard":{
+          "type":"string",
+          "description":"The name of the shard to be split."
+        },
+        "ranges" : {
+          "description" : "A comma-separated list of hexadecimal hash ranges that will be used to split the shard into new shards containing each defined range, e.g. ranges=0-1f4,1f5-3e8,3e9-5dc. This is the only option that allows splitting a single shard into more than 2 additional shards. If neither this parameter nor splitKey are defined, the shard will be split into two equal new shards.",
+          "type":"string"
+        },
+        "splitKey":{
+          "description" : "A route key to use for splitting the index. If this is defined, the shard parameter is not required because the route key will identify the correct shard. A route key that spans more than a single shard is not supported. If neither this parameter nor ranges are defined, the shard will be split into two equal new shards.",
+          "type":"string"
+        },
+        "coreProperties":{
+          "type":"object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples of core properties you may want to modify include the config set, the node name, the data directory, among others.",
+          "additionalProperties":true
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined. This command can be long-running, so running it asynchronously is recommended."
+        }
+      }
+    },
+    "create": {
+      "type":"object",
+      "properties": {
+        "nodeSet": {
+          "description": "Defines nodes to spread the new collection across. If not provided, the collection will be spread across all live Solr nodes. The names to use are the 'node_name', which can be found by a request to the cluster/nodes endpoint.",
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "shard": {
+          "description": "The name of the shard to be created.",
+          "type": "string"
+        },
+        "coreProperties": {
+          "type": "object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples of core properties you may want to modify include the config set, the node name, the data directory, among others.",
+          "additionalProperties": true
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined."
+        }
+      },
+      "required":["shard"]
+    },
+    "add-replica": {
+      "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api_addreplica",
+      "description": "",
+      "type" : "object",
+      "properties": {
+        "shard": {
+          "type": "string",
+          "description": "The name of the shard in which this replica should be created. If this parameter is not specified, then '_route_' must be defined."
+        },
+        "_route_": {
+          "type": "string",
+          "description": "If the exact shard name is not known, users may pass the _route_ value and the system would identify the name of the shard. Ignored if the shard param is also specified. If the 'shard' parameter is also defined, this parameter will be ignored."
+        },
+        "node": {
+          "type": "string",
+          "description": "The name of the node where the replica should be created."
+        },
+        "instanceDir": {
+          "type": "string",
+          "description": "An optional custom instanceDir for this replica."
+        },
+        "dataDir": {
+          "type": "string",
+          "description": "An optional custom directory used to store index data for this replica."
+        },
+        "coreProperties": {
+          "type": "object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples of core properties you may want to modify include the config set and the node name, among others.",
+          "additionalProperties": true
+        },
+        "async": {
+          "type": "string",
+          "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined."
+        },
+        "type": {
+          "type": "string",
+          "enum":["NRT", "TLOG", "PULL"],
+          "description": "The type of replica to add. NRT (default), TLOG or PULL"
+        }
+      },
+      "required":["shard"]
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.json
new file mode 100644
index 0000000..83f7ddf
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.json
@@ -0,0 +1,24 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Commands to force leader election and synchronize shards.",
+  "methods": [
+    "POST",
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}/shards/{shard}",
+      "/c/{collection}/shards/{shard}"
+    ]
+  },
+  "commands": {
+    "force-leader": {
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-ForceLeader",
+      "description": "In the unlikely event of a shard losing its leader, this command can be invoked to force the election of a new leader",
+      "type": "object"
+    },
+    "sync-shard": {
+      "type": "object"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.json
new file mode 100644
index 0000000..53c7965
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.json
@@ -0,0 +1,27 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api7",
+  "description": "Deletes a shard by unloading all replicas of the shard, removing it from clusterstate.json, and by default deleting the instanceDir and dataDir. Only inactive shards or those which have no range for custom sharding will be deleted.",
+  "methods": [
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}/shards/{shard}",
+      "/c/{collection}/shards/{shard}"
+    ],
+    "params":{
+      "deleteInstanceDir":{
+        "type": "boolean",
+        "description":"By default Solr will delete the entire instanceDir of each replica that is deleted. Set this to false to prevent the instance directory from being deleted."
+      },
+      "deleteDataDir":{
+        "type":"boolean",
+        "description":"y default Solr will delete the dataDir of each replica that is deleted. Set this to false to prevent the data directory from being deleted."
+      },
+      "async": {
+        "type": "string",
+        "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined. This command can be long-running, so running it asynchronously is recommended."
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
new file mode 100644
index 0000000..a0c8ee6
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
@@ -0,0 +1,39 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api9",
+  "description": "Deletes a replica. If the responding node is up, the core is unloaded, the entry removed from clusterstate.json, and the instanceDir and dataDir removed. If the node is not up, the entry for the replica is removed from clusterstate.json; if the nodes comes up later, the replica is automatically de-registered.",
+  "methods": [
+    "DELETE"
+  ],
+  "url": {
+    "paths": [
+      "/collections/{collection}/shards/{shard}/{replica}",
+      "/c/{collection}/shards/{shard}/{replica}"
+    ],
+    "params": {
+      "onlyIfDown": {
+        "type": "boolean",
+        "default": "false",
+        "description": "When set to 'true', no action will be taken if the replica is active."
+      },
+      "deleteIndex": {
+        "type": "boolean",
+        "default": "true",
+        "description": "By default Solr will delete the index of the replica that is deleted. Set this to false to prevent the index directory from being deleted."
+      },
+      "deleteDataDir": {
+        "type": "boolean",
+        "default": "true",
+        "description": "By default Solr will delete the dataDir of the replica that is deleted. Set this to false to prevent the data directory from being deleted."
+      },
+      "deleteInstanceDir": {
+        "type": "boolean",
+        "default": "true",
+        "description": "By default Solr will delete the entire instanceDir of the replica that is deleted. Set this to false to prevent the instance directory from being deleted."
+      },
+      "async":{
+        "type":"string",
+        "description":"Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined."
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/collections.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/collections.json b/solr/solrj/src/resources/apispec/collections.json
new file mode 100644
index 0000000..49ca976
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/collections.json
@@ -0,0 +1,13 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1",
+  "description": "List all available collections and their properties.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/collections",
+      "/c"
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.RealtimeGet.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.RealtimeGet.json b/solr/solrj/src/resources/apispec/core.RealtimeGet.json
new file mode 100644
index 0000000..308870e
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.RealtimeGet.json
@@ -0,0 +1,26 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/RealTime+Get",
+  "description": "RealTime Get allows retrieving documents by ID before the documents have been committed to the index. It is useful when you need access to documents as soon as they are indexed but your commit times are high for other reasons.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/get"
+    ],
+    "params": {
+      "id": {
+        "type": "string",
+        "description": "A single document ID to retrieve."
+      },
+      "ids": {
+        "type": "string",
+        "description": "One or more document IDs to retrieve. Separate by commas if more than one ID is specified."
+      },
+      "fq":{
+        "type": "string",
+        "description": "An optional filter query to add to the query. One use case for this is security filtering, in case users or groups should not be able to retrieve the document ID requested."
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.json
new file mode 100644
index 0000000..26c4eff
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.json
@@ -0,0 +1,27 @@
+{
+  "documentation" : "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-AddaNewCopyFieldRule",
+  "description": "Adds a new copy field rule, to allow one field to be populated with the contents of one or more other fields.",
+  "type": "object",
+  "properties": {
+    "source": {
+      "type": "string",
+      "description": "The field to copy from."
+    },
+    "dest": {
+      "type":"array",
+      "items": {
+        "type": "string"
+      },
+      "description": "A field or an array of fields to which the source field will be copied. A wildcard for a dynamic field can be used, but only if the source field also contains a dynamic field."
+    },
+    "maxChars": {
+      "type": "integer",
+      "description": "An upper limit for the number of characters to be copied. This would be useful if index size is a concern. If a limit is not specified, the entire field will be copied."
+    }
+  },
+  "required": [
+    "source",
+    "dest"
+  ]
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.addField.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.addField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addField.json
new file mode 100644
index 0000000..19265ab
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.addField.json
@@ -0,0 +1,98 @@
+{
+  "documentation" :"https://cwiki.apache.org/confluence/display/solr/Schema+API",
+  "type":"object",
+  "properties":{
+    "name": {
+      "type": "string",
+      "description": "The name of the field. Names should be alphanumeric or underscore characters only, and not start with a digit. Names also cannot begin and end with an underscore, as such field names are reserved by the system."
+    },
+    "type": {
+      "type": "string",
+      "description":"The name of the fieldType for this field."
+    },
+    "defaultValue": {
+      "type": "string",
+      "description": "An optional default value that should be added automatically to any document that does not have a value for this field."
+    },
+    "indexed": {
+      "type": "boolean",
+      "description": "If true, the field will be indexed and will be available for use in queries to retrieve matching documents. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true.",
+      "default": "true"
+    },
+    "stored": {
+      "type": "boolean",
+      "description": "If true, the actual value of the field can be retrieved by queries and be displayed in results. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true.",
+      "default":"true"
+    },
+    "omitNorms": {
+      "type": "boolean",
+      "description": "If true, length normalization and index-time boosting for a field are omitted from the index. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true for all primitive field types (such as dates, strings, boolean, and numeric fields), but will default to false for non-primitive field types."
+    },
+    "omitTermFreqAndPositions": {
+      "type": "boolean",
+      "description": "If true, all term frequency, positions, and payloads will not be indexed. This means that phrase queries, proximity queries and similar queries that rely on analysis of the frequency of a query term or the position of a term to other terms will not be supported. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true for all field types that are not text fields."
+    },
+    "termVectors": {
+      "type": "boolean",
+      "description": "If true, term vectors will be stored which can be used to optimize More Like This and optimizing highlighting wildcard queries. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "termPositions": {
+      "type": "boolean",
+      "description": "If true, term vectors will include positions. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "termOffsets": {
+      "type": "boolean",
+      "description": "If true, term vectors will include offsets. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "multiValued": {
+      "type": "boolean",
+      "description": "If true, a single document can have multiple values in a single field, and these values will be indexed. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "sortMissingFirst": {
+      "type": "boolean",
+      "description": "If true, when sorting by the field, any documents missing a value for the field will be placed at the top of the list. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false. If sortMissingFirst and sortMissingLast are both false, documents missing this field will be placed at the top when sorting in ascending order (asc) or at the bottom when sorting in descending order (desc).",
+      "default": "false"
+    },
+    "sortMissingLast": {
+      "type": "boolean",
+      "description": "If true, when sorting by the field, any documents missing a value for the field will be placed at the bottom of the list. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false. If sortMissingFirst and sortMissingLast are both false, documents missing this field will be placed at the top when sorting in ascending order (asc) or at the bottom when sorting in descending order (desc).",
+      "default": "false"
+    },
+    "required": {
+      "type": "boolean",
+      "description": "If true, any document that does not have a value for the field will be rejected. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "omitPositions": {
+      "type": "boolean",
+      "description": "If true, information about the position of terms in a document will not be stored in the index, which means phrase queries, proximity queries, and similar will not be supported for this field. It is similar to 'omitTermFreqAndPositions', but 'omitPositions' will allow term frequency information to be stored. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true for all field types that are not text fields."
+    },
+    "storeOffsetsWithPositions": {
+      "type": "boolean",
+      "description": "If true, term offsets will be stored with positions in the postings list in the index. This optimizes highlighting with the UnifiedHighlighter. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "docValues": {
+      "type": "boolean",
+      "description": "If true, field values will be stored in a column-oriented docValues structure. This can be more efficient for some fields, particularly those used for faceting. More information is available from https://cwiki.apache.org/confluence/display/solr/DocValues. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true for all non-text fields (such as dates, integers, longs, etc.)."
+    },
+    "termPayloads": {
+      "type": "boolean",
+      "description": "If true, term vectors will include payloads. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to false.",
+      "default": "false"
+    },
+    "useDocValuesAsStored": {
+      "type": "boolean",
+      "description": "If true and docValues are enabled for the field, the field will be returned when all fields are requested (using '*' with the fl parameter), even if it is not stored. If this is not defined, it will inherit the value from the fieldType. If the fieldType does not define a value, it will default to true.",
+      "default": "true"
+    }
+  },
+  "required": [
+    "name",
+    "type"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json
new file mode 100644
index 0000000..2974a60
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json
@@ -0,0 +1,51 @@
+{
+  "type": "object",
+  "properties": {
+    "class": {
+      "type": "string"
+    },
+    "charFilters": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "properties": {
+          "class": {
+            "type": "string"
+          }
+        },
+        "required": [
+          "class"
+        ],
+        "additionalProperties": true
+      }
+    },
+    "tokenizer": {
+      "type": "object",
+      "properties": {
+        "class": {
+          "type": "string"
+        }
+      },
+      "required": [
+        "class"
+      ],
+      "additionalProperties": true
+    },
+    "filters": {
+      "type": "array",
+      "items": {
+        "type": "object",
+        "properties": {
+          "class": {
+            "type": "string"
+          }
+        },
+        "required": [
+          "class"
+        ],
+        "additionalProperties": true
+      }
+    }
+  },
+  "additionalProperties": true
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.json
new file mode 100644
index 0000000..dda6847
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.json
@@ -0,0 +1,53 @@
+{
+  "type":"object",
+  "properties": {
+    "name": {
+      "type": "string",
+      "description": "The name of the field type. This name is used when defining a field. It is strongly recommended that field type names consist only of alphanumeric or underscore characters and not start with a digit."
+    },
+    "class": {
+      "type": "string",
+      "description": "The class name to use for the field type. Class names do not need to be fully qualified if they are included with Solr, so instead of 'org.apache.solr.schema.TextField', you can abbreviate the name as 'solr.TextField'. Custom or third-party class names may need to be fully qualified, however."
+    },
+    "positionIncrementGap": {
+      "type": "integer",
+      "description": "The distance between the values of a multivalued field. This is used to prevent inaccurate phrase matches across two separate values of the same field.",
+      "default": "0"
+    },
+    "autoGeneratePhraseQueries": {
+      "type": "boolean",
+      "description": "If true, phrase queries will automatically be generated for adjacent terms. If false, terms must also be enclosed in double-quotes to be treated as phrases.",
+      "default": "false"
+    },
+    "docValuesFormat": {
+      "type": "string",
+      "description": "Defines a custom DocValuesFormat to use for fields of this type. A custom DocValuesFormat requires that a schema-aware codec has also been configured in solrconfig.xml."
+    },
+    "postingsFormat": {
+      "type": "string",
+      "description": "Defines a custom PostingsFormat to use for fields of this type. A custom PostingsFormat requires that a schema-aware codec has also been configured in solrconfig.xml."
+    },
+    "queryAnalyzer": {
+      "description": "A query analyzer section defines how incoming queries to Solr will be analyzed for a field of this type.",
+      "#include": "core.SchemaEdit.addFieldType.analyzers"
+    },
+    "indexAnalyzer": {
+      "description": "An index analyzer section defines how incoming text in documents will be analyzed for a field of this type.",
+      "#include": "core.SchemaEdit.addFieldType.analyzers"
+    },
+    "multiTermAnalyzer": {
+      "description": "A multiterm analyzer section defines how incoming queries that results in Multi-Term expansion will be analyzed for a field of this type.",
+      "documentation": "https://cwiki.apache.org/confluence/display/solr/Analyzers#Analyzers-AnalysisforMulti-TermExpansion",
+      "#include": "core.SchemaEdit.addFieldType.analyzers"
+    },
+    "analyzer": {
+      "description": "An analyzer defines how both incoming text in documents and queries are analyzed for a field of this type. If a query analyzer and an index analyzer have both been defined, a general analyzer does not need to be defined for this type.",
+      "#include": "core.SchemaEdit.addFieldType.analyzers"
+    }
+  },
+  "additionalProperties": true,
+  "required": [
+    "name",
+    "class"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
new file mode 100644
index 0000000..dd6ff3a
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
@@ -0,0 +1,19 @@
+{
+  "type":"object",
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaCopyFieldRule",
+  "description": "Deletes a copy field rule. Both sides of the copy rule (source and destination) are required in order to delete the rule.",
+  "properties":{
+    "source": {
+      "type":"string",
+      "description": "The field the copy rule is defined to copy from."
+    },
+    "dest": {
+      "type": "string",
+      "description": "The field the copy rule is defined to copy to."
+    }
+  },
+  "required": [
+    "source",
+    "dest"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
new file mode 100644
index 0000000..9550548
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
@@ -0,0 +1,12 @@
+{
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaDynamicFieldRule",
+  "description": "Deletes a dynamic field.",
+  "type":"object",
+  "properties": {
+    "name": {
+      "type": "string",
+      "description": "The name of the dynamic field to delete."
+    }
+  },
+  "required":["name"]
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c5c05b46/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.json
new file mode 100644
index 0000000..6c2cb00
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.json
@@ -0,0 +1,12 @@
+{
+  "documentation" : "https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-DeleteaField",
+  "description": "Deletes a field from the schema.",
+  "type":"object",
+  "properties":{
+    "name":{
+     "description" :"The name of the field to delete.",
+      "type" : "string"
+    }
+  },
+  "required" : ["name"]
+}