You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ge...@apache.org on 2022/06/08 10:16:19 UTC

[solr] branch branch_9x updated: SOLR-15743: Convert v2 POST /config APIs to annotations (#895)

This is an automated email from the ASF dual-hosted git repository.

gerlowskija pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new d38c4a02033 SOLR-15743: Convert v2 POST /config APIs to annotations (#895)
d38c4a02033 is described below

commit d38c4a02033e32381fcb62a32174d06c45575d11
Author: Jason Gerlowski <ge...@apache.org>
AuthorDate: Wed Jun 8 06:08:13 2022 -0400

    SOLR-15743: Convert v2 POST /config APIs to annotations (#895)
    
    Solr's been in the slow process of moving its v2 APIs away from the
    existing apispec/mapping framework towards one that relies on more
    explicit annotations to specify API properties.
    
    This commit converts the POST APIs from the core.config.Commands,
    core.config.Commands.generic, and
    core.config.Commands.addRequestHandler.properties apispec files to the
    "new" framework.
---
 .../org/apache/solr/handler/SolrConfigHandler.java |  10 +-
 .../admin/api/ModifyConfigComponentAPI.java        |  63 +++++++
 .../solr/handler/admin/api/ModifyParamSetAPI.java  |  60 ++++++
 .../solr/handler/admin/V2ApiMappingTest.java       |  16 +-
 .../solr/handler/admin/V2ConfigAPIMappingTest.java |  39 ++--
 ...nfig.Commands.addRequestHandler.properties.json |  21 ---
 .../apispec/core.config.Commands.generic.json      |  15 --
 .../resources/apispec/core.config.Commands.json    | 202 ---------------------
 .../apispec/core.config.Params.Commands.json       |  31 ----
 .../apache/solr/common/util/JsonValidatorTest.java |   1 -
 10 files changed, 167 insertions(+), 291 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
index f86235f6263..b83fdb57839 100644
--- a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
@@ -32,6 +32,7 @@ import static org.apache.solr.core.SolrConfig.PluginOpts.REQUIRE_NAME;
 import static org.apache.solr.core.SolrConfig.PluginOpts.REQUIRE_NAME_IN_OVERLAY;
 import static org.apache.solr.schema.FieldType.CLASS_NAME;
 
+import com.google.common.collect.Lists;
 import java.io.IOException;
 import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
@@ -85,6 +86,8 @@ import org.apache.solr.core.SolrConfig;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.core.SolrResourceLoader;
 import org.apache.solr.handler.admin.api.GetConfigAPI;
+import org.apache.solr.handler.admin.api.ModifyConfigComponentAPI;
+import org.apache.solr.handler.admin.api.ModifyParamSetAPI;
 import org.apache.solr.pkg.PackageAPI;
 import org.apache.solr.pkg.PackageListeners;
 import org.apache.solr.request.LocalSolrQueryRequest;
@@ -1038,11 +1041,10 @@ public class SolrConfigHandler extends RequestHandlerBase
 
   @Override
   public Collection<Api> getApis() {
-    final List<Api> apis =
-        new ArrayList<>(
-            ApiBag.wrapRequestHandlers(
-                this, "core.config.Commands", "core.config.Params.Commands"));
+    final List<Api> apis = Lists.newArrayList();
     apis.addAll(AnnotatedApi.getApis(new GetConfigAPI(this)));
+    apis.addAll(AnnotatedApi.getApis(new ModifyConfigComponentAPI(this)));
+    apis.addAll(AnnotatedApi.getApis(new ModifyParamSetAPI(this)));
     return apis;
   }
 
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/ModifyConfigComponentAPI.java b/solr/core/src/java/org/apache/solr/handler/admin/api/ModifyConfigComponentAPI.java
new file mode 100644
index 00000000000..465ff329f6b
--- /dev/null
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/ModifyConfigComponentAPI.java
@@ -0,0 +1,63 @@
+/*
+ * 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.handler.admin.api;
+
+import static org.apache.solr.client.solrj.SolrRequest.METHOD.POST;
+import static org.apache.solr.security.PermissionNameProvider.Name.CONFIG_EDIT_PERM;
+
+import org.apache.solr.api.EndPoint;
+import org.apache.solr.handler.SolrConfigHandler;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+
+/**
+ * V2 APIs for creating, updating, or deleting individual components in a collection configuration.
+ *
+ * <p>This API (POST /v2/collections/collectionName/config {...}) is analogous to the commands
+ * supported by the v1 POST /collectionName/config API.
+ *
+ * <p>Typically v2 "POST" API implementations separate each "command" into a different method. This
+ * is not done here because the v1 API code in SolrConfigHandler expects to consume the request body
+ * itself (meaning that nothing _before_ SolrConfigHandler can consume the request body).
+ *
+ * <p>As a result the single method below handles all "commands" supported by the POST /config API:
+ * 'set-property, 'unset-property', 'add-requesthandler', 'update-requesthandler',
+ * 'delete-requesthandler', 'add-searchcomponent', 'update-searchcomponent',
+ * 'delete-searchcomponent', 'add-initparams', 'update-initparams', 'delete-initparams',
+ * 'add-queryresponsewriter', 'update-queryresponsewriter', 'delete-queryresponsewriter',
+ * 'add-queryparser', 'update-queryparser', 'delete-queryparser', 'add-valuesourceparser',
+ * 'update-valuesourceparser', 'delete-valuesourceparser', 'add-transformer', 'update-transformer',
+ * 'delete-transformer', 'add-updateprocessor', 'update-updateprocessor', 'delete-updateprocessor',
+ * 'add-queryconverter', 'update-queryconverter', 'delete-queryconverter', 'add-listener',
+ * 'update-listener', and 'delete-listener'.
+ */
+public class ModifyConfigComponentAPI {
+  private final SolrConfigHandler configHandler;
+
+  public ModifyConfigComponentAPI(SolrConfigHandler configHandler) {
+    this.configHandler = configHandler;
+  }
+
+  @EndPoint(
+      path = {"/config"},
+      method = POST,
+      permission = CONFIG_EDIT_PERM)
+  public void modifyConfigComponent(SolrQueryRequest req, SolrQueryResponse rsp) {
+    configHandler.handleRequest(req, rsp);
+  }
+}
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/ModifyParamSetAPI.java b/solr/core/src/java/org/apache/solr/handler/admin/api/ModifyParamSetAPI.java
new file mode 100644
index 00000000000..eb25ca4642b
--- /dev/null
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/ModifyParamSetAPI.java
@@ -0,0 +1,60 @@
+/*
+ * 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.handler.admin.api;
+
+import static org.apache.solr.client.solrj.SolrRequest.METHOD.POST;
+import static org.apache.solr.security.PermissionNameProvider.Name.CONFIG_EDIT_PERM;
+
+import java.lang.invoke.MethodHandles;
+import org.apache.solr.api.EndPoint;
+import org.apache.solr.handler.SolrConfigHandler;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * V2 APIs for creating, modifying, or deleting paramsets.
+ *
+ * <p>This API (POST /v2/collections/collectionName/config/params {...}) is analogous to the
+ * commands supported by the v1 /techproducts/config/params
+ *
+ * <p>Typically v2 "POST" API implementations separate each "command" into a different method. This
+ * is not done here because the v1 API code in SolrConfigHandler expects to consume the request body
+ * itself (meaning that nothing _before_ SolrConfigHandler can consume the request body).
+ *
+ * <p>As a result the single method below handles all three "commands" supported by the POST
+ * /config/params API: 'set', 'delete', and 'update'.
+ */
+public class ModifyParamSetAPI {
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  private final SolrConfigHandler configHandler;
+
+  public ModifyParamSetAPI(SolrConfigHandler configHandler) {
+    this.configHandler = configHandler;
+  }
+
+  @EndPoint(
+      path = {"/config/params"},
+      method = POST,
+      permission = CONFIG_EDIT_PERM)
+  public void modifyParamSets(SolrQueryRequest req, SolrQueryResponse rsp) {
+    configHandler.handleRequest(req, rsp);
+  }
+}
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java
index 585742c2598..0fb21697d8a 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/V2ApiMappingTest.java
@@ -204,14 +204,20 @@ public abstract class V2ApiMappingTest<T extends RequestHandlerBase> extends Sol
     return queryRequestCaptor.getValue().getParams();
   }
 
-  protected void assertAnnotatedApiExistsForGET(String path) {
-    final AnnotatedApi api = getAnnotatedApiForGET(path);
-    assertTrue("Expected to find API mapping for path [" + path + "] but none found!", api != null);
+  protected void assertAnnotatedApiExistsFor(String method, String path) {
+    final AnnotatedApi api = getAnnotatedApiFor(method, path);
+    assertTrue(
+        "Expected to find API mapping for method ["
+            + method
+            + "] on path ["
+            + path
+            + "], but none found!",
+        api != null);
   }
 
-  protected AnnotatedApi getAnnotatedApiForGET(String path) {
+  protected AnnotatedApi getAnnotatedApiFor(String method, String path) {
     final HashMap<String, String> parts = new HashMap<>();
-    final Api api = apiBag.lookup(path, "GET", parts);
+    final Api api = apiBag.lookup(path, method, parts);
     if (api == null) {
       fail("Expected to find API for path [" + path + "], but no API mapping found.");
     }
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
index 8d55748a5ee..ab06c383d5b 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
@@ -20,9 +20,11 @@ package org.apache.solr.handler.admin;
 import org.apache.solr.api.AnnotatedApi;
 import org.apache.solr.handler.SolrConfigHandler;
 import org.apache.solr.handler.admin.api.GetConfigAPI;
+import org.apache.solr.handler.admin.api.ModifyConfigComponentAPI;
+import org.apache.solr.handler.admin.api.ModifyParamSetAPI;
 import org.junit.Test;
 
-/** Unit tests for the GET /v2/c/collectionName/config APIs. */
+/** Unit tests for the GET and POST /v2/c/collectionName/config APIs. */
 public class V2ConfigAPIMappingTest extends V2ApiMappingTest<SolrConfigHandler> {
 
   @Override
@@ -38,12 +40,14 @@ public class V2ConfigAPIMappingTest extends V2ApiMappingTest<SolrConfigHandler>
   @Override
   public void populateApiBag() {
     apiBag.registerObject(new GetConfigAPI(getRequestHandler()));
+    apiBag.registerObject(new ModifyConfigComponentAPI(getRequestHandler()));
+    apiBag.registerObject(new ModifyParamSetAPI(getRequestHandler()));
   }
 
   // GET /v2/c/collectionName/config is a pure pass-through to the underlying request handler
   @Test
   public void testGetAllConfig() throws Exception {
-    assertAnnotatedApiExistsForGET("/config");
+    assertAnnotatedApiExistsFor("GET", "/config");
   }
 
   // GET /v2/collectionName/config/<component> is a pure pass-through to the underlying request
@@ -51,28 +55,39 @@ public class V2ConfigAPIMappingTest extends V2ApiMappingTest<SolrConfigHandler>
   // the API lookup works for a handful of the valid config "components".
   @Test
   public void testGetSingleComponentConfig() throws Exception {
-    assertAnnotatedApiExistsForGET("/config/overlay");
-    assertAnnotatedApiExistsForGET("/config/query");
-    assertAnnotatedApiExistsForGET("/config/jmx");
-    assertAnnotatedApiExistsForGET("/config/requestDispatcher");
-    assertAnnotatedApiExistsForGET("/config/znodeVersion");
-    assertAnnotatedApiExistsForGET("/config/luceneMatchVersion");
+    assertAnnotatedApiExistsFor("GET", "/config/overlay");
+    assertAnnotatedApiExistsFor("GET", "/config/query");
+    assertAnnotatedApiExistsFor("GET", "/config/jmx");
+    assertAnnotatedApiExistsFor("GET", "/config/requestDispatcher");
+    assertAnnotatedApiExistsFor("GET", "/config/znodeVersion");
+    assertAnnotatedApiExistsFor("GET", "/config/luceneMatchVersion");
   }
 
   @Test
   public void testGetParamsetsConfig() throws Exception {
-    assertAnnotatedApiExistsForGET("/config/params");
-    final AnnotatedApi getParamSetsApi = getAnnotatedApiForGET("/config/params");
+    assertAnnotatedApiExistsFor("GET", "/config/params");
+    final AnnotatedApi getParamSetsApi = getAnnotatedApiFor("GET", "/config/params");
     // Ensure that the /config/params path redirects to the /config/params specific endpoint (and
     // not the generic "/config/{component}")
     final String[] getParamSetsApiPaths = getParamSetsApi.getEndPoint().path();
     assertEquals(1, getParamSetsApiPaths.length);
     assertEquals("/config/params", getParamSetsApiPaths[0]);
 
-    assertAnnotatedApiExistsForGET("/config/params/someParamSet");
-    final AnnotatedApi getSingleParamSetApi = getAnnotatedApiForGET("/config/params/someParamSet");
+    assertAnnotatedApiExistsFor("GET", "/config/params/someParamSet");
+    final AnnotatedApi getSingleParamSetApi =
+        getAnnotatedApiFor("GET", "/config/params/someParamSet");
     final String[] getSingleParamsetApiPaths = getSingleParamSetApi.getEndPoint().path();
     assertEquals(1, getSingleParamsetApiPaths.length);
     assertEquals("/config/params/{paramset}", getSingleParamsetApiPaths[0]);
   }
+
+  @Test
+  public void testModifyConfigComponentApis() {
+    assertAnnotatedApiExistsFor("POST", "config");
+  }
+
+  @Test
+  public void testModifyParamsetApis() {
+    assertAnnotatedApiExistsFor("POST", "/config/params");
+  }
 }
diff --git a/solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json b/solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json
deleted file mode 100644
index 2d4b59f5fc5..00000000000
--- a/solr/solrj/src/resources/apispec/core.config.Commands.addRequestHandler.properties.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "type": "object",
-  "properties": {
-    "name": {
-      "type": "string",
-      "description": "The name of the request handler. This name will be used to update or remove the request handler later if necessary."
-    },
-    "class": {
-      "type": "string",
-      "description": "The request handler class. Class names do not need to be fully qualified if they are included with Solr, so you can abbreviate the name as 'solr.SearchHandler'. Custom or third-party class names may need to be fully qualified, however."
-    },
-    "startup": {
-      "type": "string",
-      "description": "Allows the request handler to only start when requested. The only option is 'lazy'.",
-      "enum": [
-        "lazy"
-      ]
-    }
-  },
-  "additionalProperties": true
-}
diff --git a/solr/solrj/src/resources/apispec/core.config.Commands.generic.json b/solr/solrj/src/resources/apispec/core.config.Commands.generic.json
deleted file mode 100644
index ca95a65c007..00000000000
--- a/solr/solrj/src/resources/apispec/core.config.Commands.generic.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "type": "object",
-  "properties": {
-    "name": {
-      "type": "string",
-      "description": "The name of this configuration item. This name will be used to update or remove this later if necessary."
-   },
-    "class": {
-      "type": "string",
-      "description": "The configuration item class. Class names do not need to be fully qualified if they are included with Solr, so you can abbreviate the name as 'solr.SearchHandler'. Custom or third-party class names may need to be fully qualified, however."
-   }
-  },
-  "required": [ "name", "class"],
-  "additionalProperties": true
-}
diff --git a/solr/solrj/src/resources/apispec/core.config.Commands.json b/solr/solrj/src/resources/apispec/core.config.Commands.json
deleted file mode 100644
index 7fd6dc4c485..00000000000
--- a/solr/solrj/src/resources/apispec/core.config.Commands.json
+++ /dev/null
@@ -1,202 +0,0 @@
-{
-  "documentation": "https://solr.apache.org/guide/config-api.html",
-  "description": "The Config API enables manipulating various aspects of your solrconfig.xml using REST-like API calls. All properties set with this API update a file called configoverlay.json, but not the solrconfig.xml file itself.",
-  "methods": [
-    "POST"
-  ],
-  "url": {
-    "paths": [
-      "/config"
-    ]
-  },
-  "commands": {
-    "set-property:": {
-      "type": "object",
-      "documentation": "https://solr.apache.org/guide/config-api.html#commands-to-modify-the-config",
-      "description": "Sets one or more of several pre-defined properties. These properties set cache sizes and classes, commit rules, JMX settings, and request dispatcher settings. See the documentation for the list of properties that are supported. If a property is set that already exists, it will be overwritten.",
-      "additionalProperties": true
-    },
-    "unset-property": {
-      "type":"array",
-      "documentation": "https://solr.apache.org/guide/config-api.html#commands-to-modify-the-config",
-      "description": "Removes one or more of several pre-defined properties. These properties set cache sizes and classes, commit rules, JMX settings, and request dispatcher settings. See the documentation for the list of properties that are supported. The value of the property does not need to be defined with the list of properties, only the name of the property.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-requesthandler": {
-      "#include":"core.config.Commands.addRequestHandler.properties",
-      "required": [
-        "name",
-        "class"
-      ]
-    },
-    "update-requesthandler": {
-      "#include":"core.config.Commands.addRequestHandler.properties",
-      "required": [
-        "name"
-      ]
-    },
-    "delete-requesthandler": {
-      "type": "array",
-      "description": "Deletes one or more request handlers, using the name given when the request handler was created. Define more than one request handler by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-searchcomponent": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-searchcomponent": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-searchcomponent": {
-      "type": "array",
-      "description": "Deletes one or more search components, using the name given when the search component was created. Define more than one search component by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-initparams": {
-      "type": "object",
-      "properties": {
-        "name": {
-          "type": "string",
-          "description": "Name by which it is added, so that it can be updated by name"
-        }
-      },
-      "additionalProperties": true
-    },
-    "update-initparams": {
-      "type": "object",
-      "properties": {
-        "name": {
-          "type": "string",
-          "description": "Name by which it is added"
-        }
-      },
-      "required": [
-        "name"
-      ],
-      "additionalProperties": true
-    },
-    "delete-initparams": {
-      "type": "array",
-      "description": "Deletes one or more init params, using the name given when the init param set was created. Define more than one init params by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-queryresponsewriter": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-queryresponsewriter": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-queryresponsewriter": {
-      "type": "array",
-      "description": "Deletes one or more query response writers, using the name given when the response writer was created. Define more than one response writer by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-queryparser": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-queryparser": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-queryparser": {
-      "type": "array",
-      "items": {
-        "type": "string"
-      },
-      "description": "Deletes one or more query parsers, using the name given when the query parser was created. Define more than one query parser by separating the list of names with commas."
-    },
-    "add-valuesourceparser": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-valuesourceparser": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-valuesourceparser": {
-      "type": "array",
-      "description": "Deletes one or more ValueSourceParsers, using the name given when the ValueSourceParser was created. Define more than one ValueSourceParsers by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-transformer": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-transformer": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-transformer": {
-      "type": "array",
-      "description": "Deletes one or more document transformers, using the name given when the document transformer was created. Define more than one document transformers by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-updateprocessor": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-updateprocessor": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-updateprocessor": {
-      "type": "array",
-      "description": "Deletes one or more update processors, using the name given when the update processor was created. Define more than one update processors by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-queryconverter": {
-      "#include": "core.config.Commands.generic"
-    },
-    "update-queryconverter": {
-      "#include": "core.config.Commands.generic"
-    },
-    "delete-queryconverter": {
-      "type": "array",
-      "description": "Deletes one or more query converters, using the name given when the query converter was created. Define more than one query converters by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "add-listener": {
-      "type": "object",
-      "properties": {
-        "name": {
-          "type": "string",
-          "description": "Name by which it is added, so that it can be updated by name"
-        }
-      },
-      "required": [
-        "name"
-      ],
-      "additionalProperties": true
-    },
-    "update-listener": {
-      "type": "object",
-      "properties": {
-        "name": {
-          "type": "string",
-          "description": "Name by which it is added"
-        }
-      },
-      "required": [
-        "name"
-      ],
-      "additionalProperties": true
-    },
-    "delete-listener": {
-      "type": "array",
-      "description": "Deletes one or more listeners, using the name given when the listener was created. Define more than one listener by separating the list of names with commas.",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}
diff --git a/solr/solrj/src/resources/apispec/core.config.Params.Commands.json b/solr/solrj/src/resources/apispec/core.config.Params.Commands.json
deleted file mode 100644
index 2e6d45d666f..00000000000
--- a/solr/solrj/src/resources/apispec/core.config.Params.Commands.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-  "documentation": "https://solr.apache.org/guide/request-parameters-api.html",
-  "description": "Create, update and delete request parameter sets (paramsets) to override or replace parameters defined in solrconfig.xml. Parameter sets are used with request handlers by setting the useParams attribute to the paramset name in the definition of the request handler or with individual requests to Solr. Parameter sets defined with this API are stored in a file params.json in ZooKeeper or on the filesystem when not using SolrCloud. Note this API does not directly update sol [...]
-  "methods": [
-    "POST"
-  ],
-  "url": {
-    "paths": [
-      "/config/params"
-    ]
-  },
-  "commands": {
-    "set:": {
-      "type":"object",
-      "description":"Add or overwrite one or more paramsets. Each paramset definition includes a paramset name, followed by key-value pairs of the parameter and value to be set.",
-      "additionalProperties": true
-    },
-    "delete": {
-      "type":"array",
-      "description": "Delete one or more paramsets.",
-      "items": {
-        "type": "string"
-      }
-    },
-    "update": {
-      "type":"object",
-      "description": "Update one or more paramsets. This command will attempt to merge an existing paramset with the new values. Each paramset definition includes a paramset name, followed by key-value pairs of the parameters and values to be updated.",
-      "additionalProperties": true
-    }
-  }
-}
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java b/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java
index f5d92bf5eaa..4ff39cdcd52 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java
@@ -25,7 +25,6 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {
   public void testSchema() {
     checkSchema("cluster.security.BasicAuth.Commands");
     checkSchema("cluster.security.RuleBasedAuthorization");
-    checkSchema("core.config.Commands");
     checkSchema("core.SchemaEdit");
   }