Skip to content

Commit 85117a8

Browse files
committed
rest-api-spec: Add missing default values from Elasticsearch specification (elastic#136191)
(cherry picked from commit f8dcd76) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json # rest-api-spec/src/main/resources/rest-api-spec/api/get.json # rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_mapping.json # rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json # rest-api-spec/src/main/resources/rest-api-spec/api/msearch_template.json # rest-api-spec/src/main/resources/rest-api-spec/api/search.json # rest-api-spec/src/main/resources/rest-api-spec/api/search_template.json # rest-api-spec/src/main/resources/rest-api-spec/api/streams.status.json # rest-api-spec/src/main/resources/rest-api-spec/api/synonyms.delete_synonym_rule.json # rest-api-spec/src/main/resources/rest-api-spec/api/synonyms.put_synonym.json # rest-api-spec/src/main/resources/rest-api-spec/api/synonyms.put_synonym_rule.json
1 parent 4a4d8c1 commit 85117a8

File tree

225 files changed

+516
-23
lines changed

Some content is hidden

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

225 files changed

+516
-23
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"params": {
3131
"keep_alive": {
3232
"type": "time",
33+
"default": "5d",
3334
"description": "Specify the time interval in which the results (partial or final) for this search will be available"
3435
}
3536
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
},
6060
"request_cache": {
6161
"type": "boolean",
62+
"default": true,
6263
"description": "Specify if request cache should be used for this request or not, defaults to true"
6364
},
6465
"analyzer": {

rest-api-spec/src/main/resources/rest-api-spec/api/autoscaling.delete_autoscaling_policy.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
},
3636
"timeout": {
3737
"type": "time",
38+
"default": "30s",
3839
"description": "Timeout for acknowledgement of update from all nodes in cluster"
3940
}
4041
}

rest-api-spec/src/main/resources/rest-api-spec/api/autoscaling.put_autoscaling_policy.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
},
3939
"timeout": {
4040
"type": "time",
41+
"default": "30s",
4142
"description": "Timeout for acknowledgement of update from all nodes in cluster"
4243
}
4344
},

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"params": {
4242
"wait_for_active_shards": {
4343
"type": "string",
44+
"default": "1",
4445
"description": "Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"
4546
},
4647
"refresh": {
@@ -50,6 +51,7 @@
5051
"false",
5152
"wait_for"
5253
],
54+
"default": "false",
5355
"description": "If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
5456
},
5557
"routing": {
@@ -58,6 +60,7 @@
5860
},
5961
"timeout": {
6062
"type": "time",
63+
"default": "1m",
6164
"description": "Explicit operation timeout"
6265
},
6366
"_source": {
@@ -78,18 +81,22 @@
7881
},
7982
"require_alias": {
8083
"type": "boolean",
81-
"description": "Sets require_alias for all incoming documents. Defaults to unset (false)"
84+
"default": false,
85+
"description": "If true, the request's actions must target an index alias. Defaults to false."
8286
},
8387
"require_data_stream": {
8488
"type": "boolean",
85-
"description": "When true, requires the destination to be a data stream (existing or to-be-created). Default is false"
89+
"default": false,
90+
"description": "If true, the request's actions must target a data stream (existing or to-be-created). Default to false"
8691
},
8792
"list_executed_pipelines": {
8893
"type": "boolean",
94+
"default": false,
8995
"description": "Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)"
9096
},
9197
"include_source_on_error": {
9298
"type": "boolean",
99+
"default": true,
93100
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
94101
}
95102
},

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
},
6868
"local": {
6969
"type": "boolean",
70+
"default": false,
7071
"description": "Return local information, do not retrieve the state from master node (default: false)"
7172
},
7273
"master_timeout": {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
},
4343
"local": {
4444
"type": "boolean",
45+
"default": false,
4546
"description": "Return local information, do not retrieve the state from master node (default: false)"
4647
},
4748
"master_timeout": {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"local": {
3232
"type": "boolean",
33+
"default": false,
3334
"description": "Return local information, do not retrieve the state from master node (default: false)"
3435
},
3536
"master_timeout": {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"params": {
3838
"allow_no_match": {
3939
"type": "boolean",
40+
"default": false,
4041
"description": "Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)"
4142
},
4243
"bytes": {
@@ -58,6 +59,7 @@
5859
},
5960
"h": {
6061
"type": "list",
62+
"default": "create_time,id,state,type",
6163
"description": "Comma-separated list of column names to display"
6264
},
6365
"help": {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"params": {
3838
"allow_no_match": {
3939
"type": "boolean",
40+
"default": true,
4041
"description": "Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
4142
},
4243
"format": {
@@ -46,6 +47,7 @@
4647
},
4748
"h": {
4849
"type": "list",
50+
"default": "['bc', 'id', 'sc', 's']",
4951
"description": "Comma-separated list of column names to display"
5052
},
5153
"help": {

0 commit comments

Comments
 (0)