Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16396: Replace the GET /config/{component} wildcards with explicit paths (#5097)

Jalaz Kumard76fc14b9857
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
index 4dab3ed7459..2a2db95683e 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
@@ -54,9 +54,43 @@ public class GetConfigAPI {
configHandler.handleRequest(req, rsp);
}
- // This endpoint currently covers a whole list of paths by using the "component" placeholder
+ // GET /config/... sections still via SolrConfigHandler.
+ // Every name SolrConfig.writeMap can emit.
+ // Delete a path from this list when that section is migrated to Jersey
@EndPoint(
- path = {"/config/{component}"},
+ path = {
+ "/config/overlay",
+ "/config/znodeVersion",
+ "/config/luceneMatchVersion",
+ "/config/query",
+ "/config/requestHandler",
+ "/config/searchComponent",
+ "/config/updateHandler",
+ "/config/queryResponseWriter",
+ "/config/initParams",
+ "/config/listener",
+ "/config/directoryFactory",
+ "/config/indexConfig",
+ "/config/codecFactory",
+ "/config/requestDispatcher",
+ "/config/jmx",
+ "/config/queryParser",
+ "/config/valueSourceParser",
+ "/config/transformer",
+ "/config/updateProcessor",
+ "/config/updateRequestProcessorChain",
+ "/config/queryConverter",
+ "/config/cache",
+ "/config/circuitBreaker",
+ "/config/expressible",
+ "/config/schemaFactory",
+ "/config/restManager",
+ "/config/statsCache",
+ "/config/recoveryStrategy",
+ "/config/indexReaderFactory",
+ "/config/indexConfigdeletionPolicy",
+ "/config/updateHandlerupdateLog"
+ },
method = GET,
permission = CONFIG_READ_PERM)
public void getComponentConfig(SolrQueryRequest req, SolrQueryResponse rsp) {
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 0a5aaab1f88..0498b25dd5c 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
@@ -55,6 +55,8 @@ public class V2ConfigAPIMappingTest extends V2ApiMappingTest<SolrConfigHandler>
assertAnnotatedApiExistsFor("GET", "/config/requestDispatcher");
assertAnnotatedApiExistsFor("GET", "/config/znodeVersion");
assertAnnotatedApiExistsFor("GET", "/config/luceneMatchVersion");
+ assertAnnotatedApiExistsFor("GET", "/config/indexConfigdeletionPolicy");
+ assertAnnotatedApiExistsFor("GET", "/config/updateHandlerupdateLog");
}
@Test