Skip to content

Apache Lucene open-source search software

SOLR-10647: move the spec files to solrj

Noble Paulc5c05b46c438
diff --git a/solr/core/src/java/org/apache/solr/api/Api.java b/solr/core/src/java/org/apache/solr/api/Api.java
index 8512c89c956..edc2206b4a6 100644
--- a/solr/core/src/java/org/apache/solr/api/Api.java
+++ b/solr/core/src/java/org/apache/solr/api/Api.java
@@ -20,6 +20,7 @@ package org.apache.solr.api;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
+import org.apache.solr.common.SpecProvider;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.SolrQueryResponse;
diff --git a/solr/core/src/java/org/apache/solr/api/ApiBag.java b/solr/core/src/java/org/apache/solr/api/ApiBag.java
index adff11b6a9f..7f30602045a 100644
--- a/solr/core/src/java/org/apache/solr/api/ApiBag.java
+++ b/solr/core/src/java/org/apache/solr/api/ApiBag.java
@@ -33,6 +33,8 @@ import java.util.stream.Collectors;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.apache.solr.common.SolrException;
+import org.apache.solr.common.SpecProvider;
+import org.apache.solr.common.util.CommandOperation;
import org.apache.solr.common.util.Utils;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.apache.solr.core.PluginBag;
@@ -42,9 +44,8 @@ import org.apache.solr.request.SolrRequestHandler;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.security.AuthorizationContext;
import org.apache.solr.security.PermissionNameProvider;
-import org.apache.solr.common.util.CommandOperation;
import org.apache.solr.util.JsonSchemaValidator;
-import org.apache.solr.util.PathTrie;
+import org.apache.solr.common.util.PathTrie;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -227,12 +228,6 @@ public class ApiBag {
}
}
- public static SpecProvider getSpec(final String name) {
- return () -> {
- return ValidatingJsonMap.parse(APISPEC_LOCATION + name + ".json", APISPEC_LOCATION);
- };
- }
-
public static class ReqHandlerToApi extends Api implements PermissionNameProvider {
SolrRequestHandler rh;
@@ -257,13 +252,10 @@ public class ApiBag {
public static List<Api> wrapRequestHandlers(final SolrRequestHandler rh, String... specs) {
ImmutableList.Builder<Api> b = ImmutableList.builder();
- for (String spec : specs) b.add(new ReqHandlerToApi(rh, ApiBag.getSpec(spec)));
+ for (String spec : specs) b.add(new ReqHandlerToApi(rh, Utils.getSpec(spec)));
return b.build();
}
- public static final String APISPEC_LOCATION = "apispec/";
- public static final String INTROSPECT = "/_introspect";
-
public static final SpecProvider EMPTY_SPEC = () -> ValidatingJsonMap.EMPTY;
public static final String HANDLER_NAME = "handlerName";
@@ -276,7 +268,7 @@ public class ApiBag {
public void registerLazy(PluginBag.PluginHolder<SolrRequestHandler> holder, PluginInfo info) {
String specName = info.attributes.get("spec");
if (specName == null) specName = "emptySpec";
- register(new LazyLoadedApi(ApiBag.getSpec(specName), holder), Collections.singletonMap(HANDLER_NAME, info.attributes.get(NAME)));
+ register(new LazyLoadedApi(Utils.getSpec(specName), holder), Collections.singletonMap(HANDLER_NAME, info.attributes.get(NAME)));
}
public static SpecProvider constructSpec(PluginInfo info) {
@@ -286,7 +278,7 @@ public class ApiBag {
Map map = (Map) specObj;
return () -> ValidatingJsonMap.getDeepCopy(map, 4, false);
} else {
- return ApiBag.getSpec((String) specObj);
+ return Utils.getSpec((String) specObj);
}
}
diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
index 76cba9c2ad0..36ca4867eb1 100644
--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
@@ -49,7 +49,7 @@ import org.apache.solr.servlet.HttpSolrCall;
import org.apache.solr.servlet.SolrDispatchFilter;
import org.apache.solr.servlet.SolrRequestParsers;
import org.apache.solr.util.JsonSchemaValidator;
-import org.apache.solr.util.PathTrie;
+import org.apache.solr.common.util.PathTrie;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,7 +58,7 @@ import static org.apache.solr.common.params.CommonParams.WT;
import static org.apache.solr.servlet.SolrDispatchFilter.Action.ADMIN;
import static org.apache.solr.servlet.SolrDispatchFilter.Action.PASSTHROUGH;
import static org.apache.solr.servlet.SolrDispatchFilter.Action.PROCESS;
-import static org.apache.solr.util.PathTrie.getPathSegments;
+import static org.apache.solr.common.util.PathTrie.getPathSegments;
// class that handle the '/v2' path
public class V2HttpCall extends HttpSolrCall {
@@ -102,7 +102,7 @@ public class V2HttpCall extends HttpSolrCall {
String collectionName = origCorename = corename = pieces.get(1);
DocCollection collection = getDocCollection(collectionName);
if (collection == null) {
- if ( ! path.endsWith(ApiBag.INTROSPECT)) {
+ if ( ! path.endsWith(CommonParams.INTROSPECT)) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "no such collection or alias");
}
} else {
@@ -124,7 +124,7 @@ public class V2HttpCall extends HttpSolrCall {
}
if (core == null) {
log.error(">> path: '" + path + "'");
- if (path.endsWith(ApiBag.INTROSPECT)) {
+ if (path.endsWith(CommonParams.INTROSPECT)) {
initAdminRequest(path);
return;
} else {
@@ -193,7 +193,7 @@ public class V2HttpCall extends HttpSolrCall {
Map<String, String> parts) {
fullPath = fullPath == null ? path : fullPath;
Api api = requestHandlers.v2lookup(path, method, parts);
- if (api == null && path.endsWith(ApiBag.INTROSPECT)) {
+ if (api == null && path.endsWith(CommonParams.INTROSPECT)) {
// the particular http method does not have any ,
// just try if any other method has this path
api = requestHandlers.v2lookup(path, null, parts);
@@ -234,7 +234,7 @@ public class V2HttpCall extends HttpSolrCall {
private static CompositeApi getSubPathApi(PluginBag<SolrRequestHandler> requestHandlers, String path, String fullPath, CompositeApi compositeApi) {
- String newPath = path.endsWith(ApiBag.INTROSPECT) ? path.substring(0, path.length() - ApiBag.INTROSPECT.length()) : path;
+ String newPath = path.endsWith(CommonParams.INTROSPECT) ? path.substring(0, path.length() - CommonParams.INTROSPECT.length()) : path;
Map<String, Set<String>> subpaths = new LinkedHashMap<>();
getSubPaths(newPath, requestHandlers.getApiBag(), subpaths);
@@ -244,12 +244,12 @@ public class V2HttpCall extends HttpSolrCall {
@Override
public void call(SolrQueryRequest req1, SolrQueryResponse rsp) {
String prefix = null;
- prefix = fullPath.endsWith(ApiBag.INTROSPECT) ?
- fullPath.substring(0, fullPath.length() - ApiBag.INTROSPECT.length()) :
+ prefix = fullPath.endsWith(CommonParams.INTROSPECT) ?
+ fullPath.substring(0, fullPath.length() - CommonParams.INTROSPECT.length()) :
fullPath;
LinkedHashMap<String, Set<String>> result = new LinkedHashMap<>(subPaths.size());
for (Map.Entry<String, Set<String>> e : subPaths.entrySet()) {
- if (e.getKey().endsWith(ApiBag.INTROSPECT)) continue;
+ if (e.getKey().endsWith(CommonParams.INTROSPECT)) continue;
result.put(prefix + e.getKey(), e.getValue());
}
diff --git a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java
index 6ba3229c2f2..f7bc14072e5 100644
--- a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java
+++ b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandlerApi.java
@@ -24,7 +24,7 @@ import java.util.Map;
import com.google.common.collect.ImmutableMap;
import org.apache.solr.common.SolrException;
import org.apache.solr.api.Api;
-import org.apache.solr.api.ApiBag;
+import org.apache.solr.common.util.Utils;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.SolrQueryResponse;
@@ -38,7 +38,7 @@ public class UpdateRequestHandlerApi extends UpdateRequestHandler {
}
private Api getApiImpl() {
- return new Api(ApiBag.getSpec("core.Update")) {
+ return new Api(Utils.getSpec("core.Update")) {
@Override
public void call(SolrQueryRequest req, SolrQueryResponse rsp) {
String path = req.getPath();
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java b/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java
index 083ec335f90..087c6f1d0a7 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java
@@ -28,7 +28,6 @@ import java.util.Objects;
import com.google.common.collect.ImmutableList;
import org.apache.solr.api.Api;
-import org.apache.solr.api.ApiBag;
import org.apache.solr.api.ApiSupport;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.request.CollectionApiMapping.CommandMeta;
@@ -73,7 +72,7 @@ public abstract class BaseHandlerApiSupport implements ApiSupport {
private Api getApi(final V2EndPoint op) {
final BaseHandlerApiSupport apiHandler = this;
- return new Api(ApiBag.getSpec(op.getSpecName())) {
+ return new Api(Utils.getSpec(op.getSpecName())) {
@Override
public void call(SolrQueryRequest req, SolrQueryResponse rsp) {
SolrParams params = req.getParams();
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
index c7cd0520be9..a2bfb5ba75e 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/InfoHandler.java
@@ -32,7 +32,7 @@ import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.api.Api;
import static java.util.Collections.singletonList;
-import static org.apache.solr.api.ApiBag.getSpec;
+import static org.apache.solr.common.util.Utils.getSpec;
import static org.apache.solr.common.params.CommonParams.PATH;
public class InfoHandler extends RequestHandlerBase {
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
index 63b93185697..6e81ccfb3bf 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/SecurityConfHandler.java
@@ -45,7 +45,7 @@ import org.apache.solr.security.PermissionNameProvider;
import org.apache.solr.common.util.CommandOperation;
import org.apache.solr.api.Api;
import org.apache.solr.api.ApiBag.ReqHandlerToApi;
-import org.apache.solr.api.SpecProvider;
+import org.apache.solr.common.SpecProvider;
import org.apache.solr.util.JsonSchemaValidator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -264,10 +264,10 @@ public abstract class SecurityConfHandler extends RequestHandlerBase implements
synchronized (this) {
if (apis == null) {
Collection<Api> apis = new ArrayList<>();
- final SpecProvider authcCommands = ApiBag.getSpec("cluster.security.authentication.Commands");
- final SpecProvider authzCommands = ApiBag.getSpec("cluster.security.authorization.Commands");
- apis.add(new ReqHandlerToApi(this, ApiBag.getSpec("cluster.security.authentication")));
- apis.add(new ReqHandlerToApi(this, ApiBag.getSpec("cluster.security.authorization")));
+ final SpecProvider authcCommands = Utils.getSpec("cluster.security.authentication.Commands");
+ final SpecProvider authzCommands = Utils.getSpec("cluster.security.authorization.Commands");
+ apis.add(new ReqHandlerToApi(this, Utils.getSpec("cluster.security.authentication")));
+ apis.add(new ReqHandlerToApi(this, Utils.getSpec("cluster.security.authorization")));
SpecProvider authcSpecProvider = () -> {
AuthenticationPlugin authcPlugin = cores.getAuthenticationPlugin();
return authcPlugin != null && authcPlugin instanceof SpecProvider ?
diff --git a/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java b/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java
index 296a2a658b5..eab89e3ca4a 100644
--- a/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java
@@ -39,7 +39,7 @@ import org.apache.http.message.BasicHeader;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.apache.solr.common.util.CommandOperation;
-import org.apache.solr.api.SpecProvider;
+import org.apache.solr.common.SpecProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java b/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
index c54453dd9a1..6bf2822d624 100644
--- a/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
@@ -27,8 +27,8 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Function;
-import org.apache.solr.api.ApiBag;
-import org.apache.solr.api.SpecProvider;
+import org.apache.solr.common.SpecProvider;
+import org.apache.solr.common.util.Utils;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.apache.solr.common.util.CommandOperation;
import org.slf4j.Logger;
@@ -238,7 +238,7 @@ public class RuleBasedAuthorizationPlugin implements AuthorizationPlugin, Config
@Override
public ValidatingJsonMap getSpec() {
- return ApiBag.getSpec("cluster.security.RuleBasedAuthorization").getSpec();
+ return Utils.getSpec("cluster.security.RuleBasedAuthorization").getSpec();
}
}
diff --git a/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java b/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
index 10ed71a4e1a..4b85c4558c7 100644
--- a/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
+++ b/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
@@ -31,9 +31,9 @@ import java.util.Set;
import com.google.common.collect.ImmutableSet;
import org.apache.commons.codec.binary.Base64;
import org.apache.solr.common.util.CommandOperation;
+import org.apache.solr.common.util.Utils;
import org.apache.solr.common.util.ValidatingJsonMap;
-import org.apache.solr.api.ApiBag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -161,7 +161,7 @@ public class Sha256AuthenticationProvider implements ConfigEditablePlugin, Basi
@Override
public ValidatingJsonMap getSpec() {
- return ApiBag.getSpec("cluster.security.BasicAuth.Commands").getSpec();
+ return Utils.getSpec("cluster.security.BasicAuth.Commands").getSpec();
}
static final Set<String> supported_ops = ImmutableSet.of("set-user", "delete-user");
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java b/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java
index 2f4fcda97d2..83b1cf34010 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java
@@ -42,7 +42,7 @@ import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.api.Api;
import org.apache.solr.api.V2HttpCall;
import org.apache.solr.common.util.CommandOperation;
-import org.apache.solr.util.PathTrie;
+import org.apache.solr.common.util.PathTrie;
import static org.apache.solr.api.ApiBag.EMPTY_SPEC;
import static org.apache.solr.client.solrj.SolrRequest.METHOD.GET;
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 02e95f7de27..a5e50dd1a2b 100644
--- a/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
+++ b/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Map;
import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.api.ApiBag;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.common.util.Utils;
@@ -48,7 +47,7 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {
public void testSchemaValidation() {
- ValidatingJsonMap spec = ApiBag.getSpec("collections.Commands").getSpec();
+ ValidatingJsonMap spec = Utils.getSpec("collections.Commands").getSpec();
Map createSchema = spec.getMap("commands", NOT_NULL).getMap("create-alias", NOT_NULL);
JsonSchemaValidator validator = new JsonSchemaValidator(createSchema);
List<String> errs = validator.validateJson(Utils.fromJSONString("{name : x, collections: [ c1 , c2]}"));
@@ -181,7 +180,7 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {
}
private void checkSchema(String name) {
- ValidatingJsonMap spec = ApiBag.getSpec(name).getSpec();
+ ValidatingJsonMap spec = Utils.getSpec(name).getSpec();
Map commands = (Map) spec.get("commands");
for (Object o : commands.entrySet()) {
Map.Entry cmd = (Map.Entry) o;
diff --git a/solr/core/src/java/org/apache/solr/api/SpecProvider.java b/solr/solrj/src/java/org/apache/solr/common/SpecProvider.java
similarity index 96%
rename from solr/core/src/java/org/apache/solr/api/SpecProvider.java
rename to solr/solrj/src/java/org/apache/solr/common/SpecProvider.java
index c373c999a3c..d111604487e 100644
--- a/solr/core/src/java/org/apache/solr/api/SpecProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SpecProvider.java
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.solr.api;
+package org.apache.solr.common;
import org.apache.solr.common.util.ValidatingJsonMap;
/**A generic interface for any class that is capable of providing its specification as a json schema
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index dad586e60aa..3b24f224cd5 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -17,6 +17,7 @@
package org.apache.solr.common.params;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
@@ -184,7 +185,7 @@ public interface CommonParams {
String AUTOSCALING_PATH = "/admin/autoscaling";
String AUTOSCALING_DIAGNOSTICS_PATH = "/admin/autoscaling/diagnostics";
- Set<String> ADMIN_PATHS = new HashSet<>(Arrays.asList(
+ Set<String> ADMIN_PATHS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
CORES_HANDLER_PATH,
COLLECTIONS_HANDLER_PATH,
CONFIGSETS_HANDLER_PATH,
@@ -192,7 +193,9 @@ public interface CommonParams {
AUTHZ_PATH,
METRICS_PATH,
AUTOSCALING_PATH,
- AUTOSCALING_DIAGNOSTICS_PATH));
+ AUTOSCALING_DIAGNOSTICS_PATH)));
+ String APISPEC_LOCATION = "apispec/";
+ String INTROSPECT = "/_introspect";
/** valid values for: <code>echoParams</code> */
enum EchoParamStyle {
diff --git a/solr/core/src/java/org/apache/solr/util/PathTrie.java b/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java
similarity index 99%
rename from solr/core/src/java/org/apache/solr/util/PathTrie.java
rename to solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java
index ceaa5de4fbe..b02a3237d48 100644
--- a/solr/core/src/java/org/apache/solr/util/PathTrie.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/PathTrie.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.solr.util;
+package org.apache.solr.common.util;
import java.util.ArrayList;
import java.util.HashSet;
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 ce2c305e87d..b64f9712b28 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);
+ };
+ }
}
diff --git a/solr/core/src/resources/apispec/autoscaling.Commands.json b/solr/solrj/src/resources/apispec/autoscaling.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/autoscaling.Commands.json
rename to solr/solrj/src/resources/apispec/autoscaling.Commands.json
diff --git a/solr/core/src/resources/apispec/cluster.Commands.json b/solr/solrj/src/resources/apispec/cluster.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.Commands.json
rename to solr/solrj/src/resources/apispec/cluster.Commands.json
diff --git a/solr/core/src/resources/apispec/cluster.aliases.json b/solr/solrj/src/resources/apispec/cluster.aliases.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.aliases.json
rename to solr/solrj/src/resources/apispec/cluster.aliases.json
diff --git a/solr/core/src/resources/apispec/cluster.commandstatus.delete.json b/solr/solrj/src/resources/apispec/cluster.commandstatus.delete.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.commandstatus.delete.json
rename to solr/solrj/src/resources/apispec/cluster.commandstatus.delete.json
diff --git a/solr/core/src/resources/apispec/cluster.commandstatus.json b/solr/solrj/src/resources/apispec/cluster.commandstatus.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.commandstatus.json
rename to solr/solrj/src/resources/apispec/cluster.commandstatus.json
diff --git a/solr/core/src/resources/apispec/cluster.configs.Commands.json b/solr/solrj/src/resources/apispec/cluster.configs.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.configs.Commands.json
rename to solr/solrj/src/resources/apispec/cluster.configs.Commands.json
diff --git a/solr/core/src/resources/apispec/cluster.configs.delete.json b/solr/solrj/src/resources/apispec/cluster.configs.delete.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.configs.delete.json
rename to solr/solrj/src/resources/apispec/cluster.configs.delete.json
diff --git a/solr/core/src/resources/apispec/cluster.configs.json b/solr/solrj/src/resources/apispec/cluster.configs.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.configs.json
rename to solr/solrj/src/resources/apispec/cluster.configs.json
diff --git a/solr/core/src/resources/apispec/cluster.json b/solr/solrj/src/resources/apispec/cluster.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.json
rename to solr/solrj/src/resources/apispec/cluster.json
diff --git a/solr/core/src/resources/apispec/cluster.nodes.json b/solr/solrj/src/resources/apispec/cluster.nodes.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.nodes.json
rename to solr/solrj/src/resources/apispec/cluster.nodes.json
diff --git a/solr/core/src/resources/apispec/cluster.security.BasicAuth.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.security.BasicAuth.Commands.json
rename to solr/solrj/src/resources/apispec/cluster.security.BasicAuth.Commands.json
diff --git a/solr/core/src/resources/apispec/cluster.security.RuleBasedAuthorization.json b/solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.security.RuleBasedAuthorization.json
rename to solr/solrj/src/resources/apispec/cluster.security.RuleBasedAuthorization.json
diff --git a/solr/core/src/resources/apispec/cluster.security.authentication.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.security.authentication.Commands.json
rename to solr/solrj/src/resources/apispec/cluster.security.authentication.Commands.json
diff --git a/solr/core/src/resources/apispec/cluster.security.authentication.json b/solr/solrj/src/resources/apispec/cluster.security.authentication.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.security.authentication.json
rename to solr/solrj/src/resources/apispec/cluster.security.authentication.json
diff --git a/solr/core/src/resources/apispec/cluster.security.authorization.Commands.json b/solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.security.authorization.Commands.json
rename to solr/solrj/src/resources/apispec/cluster.security.authorization.Commands.json
diff --git a/solr/core/src/resources/apispec/cluster.security.authorization.json b/solr/solrj/src/resources/apispec/cluster.security.authorization.json
similarity index 100%
rename from solr/core/src/resources/apispec/cluster.security.authorization.json
rename to solr/solrj/src/resources/apispec/cluster.security.authorization.json
diff --git a/solr/core/src/resources/apispec/collections.Commands.json b/solr/solrj/src/resources/apispec/collections.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.Commands.json
rename to solr/solrj/src/resources/apispec/collections.Commands.json
diff --git a/solr/core/src/resources/apispec/collections.collection.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.Commands.json
rename to solr/solrj/src/resources/apispec/collections.collection.Commands.json
diff --git a/solr/core/src/resources/apispec/collections.collection.Commands.modify.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.Commands.modify.json
rename to solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
diff --git a/solr/core/src/resources/apispec/collections.collection.Commands.reload.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.reload.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.Commands.reload.json
rename to solr/solrj/src/resources/apispec/collections.collection.Commands.reload.json
diff --git a/solr/core/src/resources/apispec/collections.collection.delete.json b/solr/solrj/src/resources/apispec/collections.collection.delete.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.delete.json
rename to solr/solrj/src/resources/apispec/collections.collection.delete.json
diff --git a/solr/core/src/resources/apispec/collections.collection.json b/solr/solrj/src/resources/apispec/collections.collection.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.json
rename to solr/solrj/src/resources/apispec/collections.collection.json
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.shards.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.shards.Commands.json
rename to solr/solrj/src/resources/apispec/collections.collection.shards.Commands.json
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
rename to solr/solrj/src/resources/apispec/collections.collection.shards.shard.Commands.json
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
rename to solr/solrj/src/resources/apispec/collections.collection.shards.shard.delete.json
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json b/solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
rename to solr/solrj/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
diff --git a/solr/core/src/resources/apispec/collections.json b/solr/solrj/src/resources/apispec/collections.json
similarity index 100%
rename from solr/core/src/resources/apispec/collections.json
rename to solr/solrj/src/resources/apispec/collections.json
diff --git a/solr/core/src/resources/apispec/core.RealtimeGet.json b/solr/solrj/src/resources/apispec/core.RealtimeGet.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.RealtimeGet.json
rename to solr/solrj/src/resources/apispec/core.RealtimeGet.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.addCopyField.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.addCopyField.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addField.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.addField.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.addField.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.analyzers.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.addFieldType.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.addFieldType.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteCopyField.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteDynamicField.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteField.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteField.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.deleteFieldType.json
diff --git a/solr/core/src/resources/apispec/core.SchemaEdit.json b/solr/solrj/src/resources/apispec/core.SchemaEdit.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaEdit.json
rename to solr/solrj/src/resources/apispec/core.SchemaEdit.json
diff --git a/solr/core/src/resources/apispec/core.SchemaRead.copyFields.json b/solr/solrj/src/resources/apispec/core.SchemaRead.copyFields.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaRead.copyFields.json
rename to solr/solrj/src/resources/apispec/core.SchemaRead.copyFields.json
diff --git a/solr/core/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.json b/solr/solrj/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.json
rename to solr/solrj/src/resources/apispec/core.SchemaRead.dynamicFields_fieldTypes.json
diff --git a/solr/core/src/resources/apispec/core.SchemaRead.fields.json b/solr/solrj/src/resources/apispec/core.SchemaRead.fields.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaRead.fields.json
rename to solr/solrj/src/resources/apispec/core.SchemaRead.fields.json
diff --git a/solr/core/src/resources/apispec/core.SchemaRead.json b/solr/solrj/src/resources/apispec/core.SchemaRead.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.SchemaRead.json
rename to solr/solrj/src/resources/apispec/core.SchemaRead.json
diff --git a/solr/core/src/resources/apispec/core.Update.json b/solr/solrj/src/resources/apispec/core.Update.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.Update.json
rename to solr/solrj/src/resources/apispec/core.Update.json
diff --git a/solr/core/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json b/solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json
rename to solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json
diff --git a/solr/core/src/resources/apispec/core.config.Commands.generic.json b/solr/solrj/src/resources/apispec/core.config.Commands.generic.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.Commands.generic.json
rename to solr/solrj/src/resources/apispec/core.config.Commands.generic.json
diff --git a/solr/core/src/resources/apispec/core.config.Commands.json b/solr/solrj/src/resources/apispec/core.config.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.Commands.json
rename to solr/solrj/src/resources/apispec/core.config.Commands.json
diff --git a/solr/core/src/resources/apispec/core.config.Commands.runtimeLib.json b/solr/solrj/src/resources/apispec/core.config.Commands.runtimeLib.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.Commands.runtimeLib.json
rename to solr/solrj/src/resources/apispec/core.config.Commands.runtimeLib.json
diff --git a/solr/core/src/resources/apispec/core.config.Params.Commands.json b/solr/solrj/src/resources/apispec/core.config.Params.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.Params.Commands.json
rename to solr/solrj/src/resources/apispec/core.config.Params.Commands.json
diff --git a/solr/core/src/resources/apispec/core.config.Params.json b/solr/solrj/src/resources/apispec/core.config.Params.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.Params.json
rename to solr/solrj/src/resources/apispec/core.config.Params.json
diff --git a/solr/core/src/resources/apispec/core.config.json b/solr/solrj/src/resources/apispec/core.config.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.config.json
rename to solr/solrj/src/resources/apispec/core.config.json
diff --git a/solr/core/src/resources/apispec/core.system.blob.json b/solr/solrj/src/resources/apispec/core.system.blob.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.system.blob.json
rename to solr/solrj/src/resources/apispec/core.system.blob.json
diff --git a/solr/core/src/resources/apispec/core.system.blob.upload.json b/solr/solrj/src/resources/apispec/core.system.blob.upload.json
similarity index 100%
rename from solr/core/src/resources/apispec/core.system.blob.upload.json
rename to solr/solrj/src/resources/apispec/core.system.blob.upload.json
diff --git a/solr/core/src/resources/apispec/cores.Commands.json b/solr/solrj/src/resources/apispec/cores.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cores.Commands.json
rename to solr/solrj/src/resources/apispec/cores.Commands.json
diff --git a/solr/core/src/resources/apispec/cores.Status.json b/solr/solrj/src/resources/apispec/cores.Status.json
similarity index 100%
rename from solr/core/src/resources/apispec/cores.Status.json
rename to solr/solrj/src/resources/apispec/cores.Status.json
diff --git a/solr/core/src/resources/apispec/cores.core.Commands.json b/solr/solrj/src/resources/apispec/cores.core.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/cores.core.Commands.json
rename to solr/solrj/src/resources/apispec/cores.core.Commands.json
diff --git a/solr/core/src/resources/apispec/cores.core.Commands.split.json b/solr/solrj/src/resources/apispec/cores.core.Commands.split.json
similarity index 100%
rename from solr/core/src/resources/apispec/cores.core.Commands.split.json
rename to solr/solrj/src/resources/apispec/cores.core.Commands.split.json
diff --git a/solr/core/src/resources/apispec/emptySpec.json b/solr/solrj/src/resources/apispec/emptySpec.json
similarity index 100%
rename from solr/core/src/resources/apispec/emptySpec.json
rename to solr/solrj/src/resources/apispec/emptySpec.json
diff --git a/solr/core/src/resources/apispec/node.Commands.json b/solr/solrj/src/resources/apispec/node.Commands.json
similarity index 100%
rename from solr/core/src/resources/apispec/node.Commands.json
rename to solr/solrj/src/resources/apispec/node.Commands.json
diff --git a/solr/core/src/resources/apispec/node.Info.json b/solr/solrj/src/resources/apispec/node.Info.json
similarity index 100%
rename from solr/core/src/resources/apispec/node.Info.json
rename to solr/solrj/src/resources/apispec/node.Info.json
diff --git a/solr/core/src/resources/apispec/node.invoke.json b/solr/solrj/src/resources/apispec/node.invoke.json
similarity index 100%
rename from solr/core/src/resources/apispec/node.invoke.json
rename to solr/solrj/src/resources/apispec/node.invoke.json
diff --git a/solr/core/src/test/org/apache/solr/api/TestPathTrie.java b/solr/solrj/src/test/org/apache/solr/common/util/TestPathTrie.java
similarity index 96%
rename from solr/core/src/test/org/apache/solr/api/TestPathTrie.java
rename to solr/solrj/src/test/org/apache/solr/common/util/TestPathTrie.java
index d4cbf32b102..2eea2db7ca8 100644
--- a/solr/core/src/test/org/apache/solr/api/TestPathTrie.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/TestPathTrie.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.solr.api;
+package org.apache.solr.common.util;
import java.util.HashMap;
import java.util.HashSet;
@@ -23,7 +23,7 @@ import java.util.Set;
import com.google.common.collect.ImmutableSet;
import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.util.PathTrie;
+import org.apache.solr.common.util.PathTrie;
import static java.util.Collections.emptyMap;
import static java.util.Collections.singletonMap;