From 1f6c953194a18a8e93bc8e4239e972645e8aac81 Mon Sep 17 00:00:00 2001 From: Rory Hunter Date: Thu, 18 Jun 2020 08:57:39 +0100 Subject: [PATCH] Rename dangling index APIs (#58266) The dangling_indices.import API name could cause issues in the client libs because import is a reserved word in many languages. Rename the API to avoid this, and rename the other APIs for consistency. Related to #48366. --- .../org/elasticsearch/client/RestHighLevelClientTests.java | 6 +++--- ...ete.json => dangling_indices.delete_dangling_index.json} | 2 +- ...ort.json => dangling_indices.import_dangling_index.json} | 2 +- ...ist.json => dangling_indices.list_dangling_indices.json} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename rest-api-spec/src/main/resources/rest-api-spec/api/{dangling_indices.delete.json => dangling_indices.delete_dangling_index.json} (95%) rename rest-api-spec/src/main/resources/rest-api-spec/api/{dangling_indices.import.json => dangling_indices.import_dangling_index.json} (95%) rename rest-api-spec/src/main/resources/rest-api-spec/api/{dangling_indices.list.json => dangling_indices.list_dangling_indices.json} (89%) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java index babb2e97902ed..5a1fe00112ef9 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java @@ -813,9 +813,9 @@ public void testApiNamingConventions() throws Exception { "cluster.stats", "cluster.post_voting_config_exclusions", "cluster.delete_voting_config_exclusions", - "dangling_indices.delete", - "dangling_indices.import", - "dangling_indices.list", + "dangling_indices.delete_dangling_index", + "dangling_indices.import_dangling_index", + "dangling_indices.list_dangling_indices", "indices.shard_stores", "indices.upgrade", "indices.recovery", diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete.json b/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete_dangling_index.json similarity index 95% rename from rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete.json rename to rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete_dangling_index.json index e7f7136a98fe5..1e3d74784591b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete_dangling_index.json @@ -1,5 +1,5 @@ { - "dangling_indices.delete": { + "dangling_indices.delete_dangling_index": { "documentation": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description": "Deletes the specified dangling index" diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import.json b/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import_dangling_index.json similarity index 95% rename from rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import.json rename to rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import_dangling_index.json index 53f44f6b08eea..e9dce01a76727 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import_dangling_index.json @@ -1,5 +1,5 @@ { - "dangling_indices.import": { + "dangling_indices.import_dangling_index": { "documentation": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description": "Imports the specified dangling index" diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list.json b/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list_dangling_indices.json similarity index 89% rename from rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list.json rename to rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list_dangling_indices.json index 9925167906c96..dfc21f56ddfac 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list_dangling_indices.json @@ -1,5 +1,5 @@ { - "dangling_indices.list": { + "dangling_indices.list_dangling_indices": { "documentation": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html", "description": "Returns all dangling indices."