Skip to content

Commit 3aed800

Browse files
authored
rest-api-spec: Use more precise number types (elastic#136378) (elastic#136460)
(cherry picked from commit f891430) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cluster.allocation_explain.json
1 parent cb072d3 commit 3aed800

30 files changed

+73
-73
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/_internal.update_desired_nodes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"description": "the history id"
2828
},
2929
"version": {
30-
"type": "integer",
30+
"type": "int",
3131
"description": "the version number"
3232
}
3333
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"default": "5d"
5454
},
5555
"batched_reduce_size": {
56-
"type": "number",
56+
"type": "long",
5757
"description": "The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.",
5858
"default": 5
5959
},
@@ -101,7 +101,7 @@
101101
"description": "A comma-separated list of fields to return as the docvalue representation of a field for each hit"
102102
},
103103
"from": {
104-
"type": "number",
104+
"type": "int",
105105
"description": "Starting offset (default: 0)"
106106
},
107107
"ignore_unavailable": {
@@ -158,7 +158,7 @@
158158
"description": "Search operation type"
159159
},
160160
"size": {
161-
"type": "number",
161+
"type": "int",
162162
"description": "Number of hits to return (default: 10)"
163163
},
164164
"sort": {
@@ -178,7 +178,7 @@
178178
"description": "A list of fields to extract and return from the _source field"
179179
},
180180
"terminate_after": {
181-
"type": "number",
181+
"type": "long",
182182
"description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
183183
},
184184
"stats": {
@@ -200,7 +200,7 @@
200200
"description": "Specify suggest mode"
201201
},
202202
"suggest_size": {
203-
"type": "number",
203+
"type": "long",
204204
"description": "How many suggestions to return in response"
205205
},
206206
"suggest_text": {
@@ -237,7 +237,7 @@
237237
"description": "Specify whether to return sequence number and primary term of the last modification of each hit"
238238
},
239239
"max_concurrent_shard_requests": {
240-
"type": "number",
240+
"type": "int",
241241
"description": "The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests",
242242
"default": 5
243243
}

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
@@ -86,7 +86,7 @@
8686
"description": "Return settings in flat format (default: false)"
8787
},
8888
"wait_for_metadata_version": {
89-
"type": "number",
89+
"type": "long",
9090
"description": "Wait for the metadata version to be equal or greater than the specified metadata version"
9191
},
9292
"wait_for_timeout": {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
6868
},
6969
"min_score": {
70-
"type": "number",
70+
"type": "double",
7171
"description": "Include only documents with a specific `_score` value in the result"
7272
},
7373
"preference": {
@@ -110,7 +110,7 @@
110110
"description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
111111
},
112112
"terminate_after": {
113-
"type": "number",
113+
"type": "long",
114114
"description": "The maximum count for each shard, upon reaching which the query execution will terminate early"
115115
}
116116
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"description": "Explicit operation timeout"
6262
},
6363
"version": {
64-
"type": "number",
64+
"type": "long",
6565
"description": "Explicit version number for concurrency control"
6666
},
6767
"version_type": {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@
5757
"description": "Explicit operation timeout"
5858
},
5959
"if_seq_no": {
60-
"type": "number",
60+
"type": "long",
6161
"description": "only perform the delete operation if the last operation that has changed the document has the specified sequence number"
6262
},
6363
"if_primary_term": {
64-
"type": "number",
64+
"type": "long",
6565
"description": "only perform the delete operation if the last operation that has changed the document has the specified primary term"
6666
},
6767
"version": {
68-
"type": "number",
68+
"type": "long",
6969
"description": "Explicit version number for concurrency control"
7070
},
7171
"version_type": {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"description": "The field to use as default where no field prefix is given in the query string"
5555
},
5656
"from": {
57-
"type": "number",
57+
"type": "long",
5858
"default": 0,
5959
"description": "Starting offset (default: 0)"
6060
},
@@ -123,15 +123,15 @@
123123
"description": "Explicit timeout for each search request. Defaults to no timeout."
124124
},
125125
"max_docs": {
126-
"type": "number",
126+
"type": "long",
127127
"description": "Maximum number of documents to process (default: all documents)"
128128
},
129129
"sort": {
130130
"type": "list",
131131
"description": "A comma-separated list of <field>:<direction> pairs"
132132
},
133133
"terminate_after": {
134-
"type": "number",
134+
"type": "long",
135135
"description": "The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."
136136
},
137137
"stats": {
@@ -162,7 +162,7 @@
162162
"description": "Sets the number of shard copies that must be active before proceeding with the delete by query 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)"
163163
},
164164
"scroll_size": {
165-
"type": "number",
165+
"type": "long",
166166
"default": 1000,
167167
"description": "Size on the scroll request powering the delete by query"
168168
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"description": "A list of fields to extract and return from the _source field"
6868
},
6969
"version": {
70-
"type": "number",
70+
"type": "long",
7171
"description": "Explicit version number for concurrency control"
7272
},
7373
"version_type": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"description": "A list of fields to extract and return from the _source field"
6464
},
6565
"version": {
66-
"type": "number",
66+
"type": "long",
6767
"description": "Explicit version number for concurrency control"
6868
},
6969
"version_type": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"description": "A list of fields to extract and return from the _source field"
7474
},
7575
"version": {
76-
"type": "number",
76+
"type": "long",
7777
"description": "Explicit version number for concurrency control"
7878
},
7979
"version_type": {

0 commit comments

Comments
 (0)