Skip to content

Commit 90ba83a

Browse files
committed
rest-api-spec: fix type of enums (elastic#137521)
Sometimes enums are comma-separated, in which cases they are lists with options. In other cases, they were specified as string without options, which was incorrect. (cherry picked from commit 8acc4d1) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json # rest-api-spec/src/main/resources/rest-api-spec/api/indices.resolve_index.json # rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json # rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_contextualai.json # rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
1 parent c569568 commit 90ba83a

File tree

82 files changed

+262
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+262
-113
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/async_search.submit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
118118
},
119119
"expand_wildcards": {
120-
"type": "enum",
120+
"type": "list",
121121
"options": [
122122
"open",
123123
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"default": false
6060
},
6161
"expand_wildcards": {
62-
"type": "enum",
62+
"type": "list",
6363
"options": [
6464
"open",
6565
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/cat.indices.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"default": false
109109
},
110110
"expand_wildcards": {
111-
"type": "enum",
111+
"type": "list",
112112
"options": [
113113
"open",
114114
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,14 @@
110110
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression."
111111
},
112112
"expand_wildcards": {
113-
"type": "enum",
114-
"options": ["open", "closed", "hidden", "none", "all"],
113+
"type": "list",
114+
"options": [
115+
"open",
116+
"closed",
117+
"hidden",
118+
"none",
119+
"all"
120+
],
115121
"default": "open",
116122
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
117123
},

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.health.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"params": {
3737
"expand_wildcards": {
38-
"type": "enum",
38+
"type": "list",
3939
"options": [
4040
"open",
4141
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
105105
},
106106
"expand_wildcards": {
107-
"type": "enum",
107+
"type": "list",
108108
"options": [
109109
"open",
110110
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/count.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
5656
},
5757
"expand_wildcards": {
58-
"type": "enum",
58+
"type": "list",
5959
"options": [
6060
"open",
6161
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"description": "What to do when the delete by query hits version conflicts?"
7979
},
8080
"expand_wildcards": {
81-
"type": "enum",
81+
"type": "list",
8282
"options": [
8383
"open",
8484
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/eql.search.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
7373
},
7474
"expand_wildcards": {
75-
"type": "enum",
75+
"type": "list",
7676
"options": [
7777
"open",
7878
"closed",

rest-api-spec/src/main/resources/rest-api-spec/api/field_caps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
5555
},
5656
"expand_wildcards": {
57-
"type": "enum",
57+
"type": "list",
5858
"options": [
5959
"open",
6060
"closed",

0 commit comments

Comments
 (0)