summaryrefslogtreecommitdiff
path: root/rest-api-spec/src
diff options
context:
space:
mode:
authorLee Hinman <lee@writequit.org>2017-05-16 14:14:07 -0600
committerLee Hinman <lee@writequit.org>2017-06-02 14:43:38 -0600
commita32d1b91fa44c005ea41fa17323ea6bc65352092 (patch)
treec0b25211a6699f8d87cc98082e1e37bd0f01b8f3 /rest-api-spec/src
parentb9e2a1f9890e12948c7e6a2fb57c30ca2b1fa76a (diff)
Remove comma-separated feature parsing for GetIndicesAction
This removes the parsing of things like `GET /idx/_aliases,_mappings`, instead, a user must choose between retriving all index metadata with `GET /idx`, or only a specific form such as `GET /idx/_settings`. Relates to (and is a prerequisite of) #24437
Diffstat (limited to 'rest-api-spec/src')
-rw-r--r--rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json7
-rw-r--r--rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml33
-rw-r--r--rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml3
-rw-r--r--rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/30_remove_index_and_replace_with_alias.yml2
4 files changed, 6 insertions, 39 deletions
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json
index e58af6d50b..f615718c7d 100644
--- a/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json
+++ b/rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json
@@ -4,17 +4,12 @@
"methods":[ "GET" ],
"url":{
"path":"/{index}",
- "paths":[ "/{index}", "/{index}/{feature}" ],
+ "paths":[ "/{index}" ],
"parts":{
"index":{
"type":"list",
"required" : true,
"description":"A comma-separated list of index names"
- },
- "feature":{
- "type":"list",
- "description":"A comma-separated list of features",
- "options": ["_settings", "_mappings", "_aliases"]
}
},
"params":{
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml
index 54728644f7..b6ac97eb91 100644
--- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml
+++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml
@@ -53,41 +53,18 @@ setup:
- is_true: test_index.mappings
---
-"Get index infos for mappings only":
-
- - do:
- indices.get:
- index: test_index
- feature: _mapping
-
- - is_true: test_index.mappings
- - is_false: test_index.aliases
- - is_false: test_index.settings
-
----
-"Get index infos should work on aliases":
-
- - do:
- indices.get:
- index: test_blias
- feature: _mapping
-
- - is_true: test_index.mappings
- - is_false: test_index.aliases
- - is_false: test_index.settings
-
----
"Get index infos should work for wildcards":
- do:
indices.get:
index: test_*
- feature: _mapping,_settings
- is_true: test_index.mappings
+ - is_true: test_index.aliases
- is_true: test_index.settings
- is_true: test_index_2.settings
- - is_false: test_index.aliases
+ - is_true: test_index_2.mappings
+ - is_true: test_index_2.aliases
---
"Get index infos with human settings should return index creation date and version in readable format":
@@ -95,7 +72,6 @@ setup:
- do:
indices.get:
index: test_index
- feature: _settings
human: true
- is_true: test_index.settings.index.creation_date_string
@@ -107,7 +83,6 @@ setup:
- do:
indices.get:
index: test_index
- feature: _settings
- is_false: test_index.settings.index.creation_date_string
- is_false: test_index.settings.index.version.created_string
@@ -169,7 +144,6 @@ setup:
- do:
indices.get:
index: test_index_*
- feature: _settings
expand_wildcards: closed
- is_false: test_index_2.settings
@@ -181,7 +155,6 @@ setup:
- do:
indices.get:
index: test_index_*
- feature: _settings
expand_wildcards: open,closed
- is_true: test_index_2.settings
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml
index d930b4a3fb..e812856a3d 100644
--- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml
+++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml
@@ -96,12 +96,11 @@ setup:
"Get test-* with wildcard_expansion=none":
- do:
+ catch: missing
indices.get_mapping:
index: test-x*
expand_wildcards: none
- - match: { $body: {} }
-
---
"Get test-* with wildcard_expansion=open,closed":
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/30_remove_index_and_replace_with_alias.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/30_remove_index_and_replace_with_alias.yml
index ff1c77a87d..ebf923e259 100644
--- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/30_remove_index_and_replace_with_alias.yml
+++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/30_remove_index_and_replace_with_alias.yml
@@ -29,7 +29,7 @@
- is_true: ''
- do:
- indices.get_mapping:
+ indices.get:
index: test
# the name of the index that the alias points to, would be `test` if the index were still there
- is_true: test_2