diff options
author | Lee Hinman <dakrone@users.noreply.github.com> | 2017-06-08 10:57:04 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-08 10:57:04 -0600 |
commit | 050b7cd0f97c9a7835b837f2f64626f2acc39871 (patch) | |
tree | 37e6db14aa58efd43b0b979683fac7c5d125f174 /rest-api-spec/src | |
parent | 5b2ab96364335539affe99151546552423700f6e (diff) |
Include empty mappings in GET /{index}/_mappings requests (#25118)
Previously this would output:
```
GET /test-1/_mappings
{ }
```
And after this change:
```
GET /test-1/_mappings
{
"test-1": {
"mappings": {}
}
}
```
To bring parity back to the REST output after #24723.
Relates to #25090
Diffstat (limited to 'rest-api-spec/src')
-rw-r--r-- | rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml index eed35fe422..e9418f0a6c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml @@ -20,6 +20,19 @@ setup: type_3: {} --- +"Get /{index}/_mapping with empty mappings": + + - do: + indices.create: + index: t + + - do: + indices.get_mapping: + index: t + + - match: { t.mappings: {}} + +--- "Get /_mapping": - skip: |