Skip to content

Commit 877733b

Browse files
committed
Convert eql and ccr examples
1 parent bec9a30 commit 877733b

19 files changed

+104
-73
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ actions:
106106
application/json:
107107
examples:
108108
clusterPutSettingsRequestExample1:
109-
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
109+
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
110110
- target: "$.paths['/_cluster/reroute']['post']"
111111
description: "Add examples for cluster reroute operation"
112112
update:
@@ -115,7 +115,7 @@ actions:
115115
application/json:
116116
examples:
117117
clusterRerouteRequestExample1:
118-
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
118+
$ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml"
119119
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
120120
description: "Add examples for nodes reload secure settings operation"
121121
update:

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,17 +1153,17 @@ actions:
11531153
application/json:
11541154
examples:
11551155
eqlSearchRequestExample1:
1156-
$ref: "../../specification/eql/search/EqlSearchRequestExample1.json"
1156+
$ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample1.yaml"
11571157
eqlSearchRequestExample2:
1158-
$ref: "../../specification/eql/search/EqlSearchRequestExample2.json"
1158+
$ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample2.yaml"
11591159
- target: "$.components['reponses']['eql.search#200']"
11601160
description: "Add examples for EQL search operation"
11611161
update:
11621162
content:
11631163
application/json:
11641164
examples:
11651165
eqlSearchResponseExample2:
1166-
$ref: "../../specification/eql/search/EqlSearchResponseExample2.json"
1166+
$ref: "../../specification/eql/search/examples/response/EqlSearchResponseExample2.yaml"
11671167
- target: "$.paths['/_query']['post']"
11681168
description: "Add examples for ES|QL query operation"
11691169
update:

specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# summary:
1+
# summary:
22
description: A successful response when performing search asynchronously.
33
# type: "response"
44
# response_code: 200
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"summary": "A successful response for creating a follower index.",
3-
"description": "",
4-
"type": "response",
5-
"response_code": 200,
6-
"value": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}"
2+
'summary': 'A successful response for creating a follower index.',
3+
'description': '',
4+
'type': 'response',
5+
'response_code': 200,
6+
'value': "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}"
77
}

specification/ccr/forget_follower/examples/response/ForgetFollowerIndexResponseExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
summary:
1+
summary:
22
description: >
33
A successful response for removing the follower retention leases from the leader index.
44
# type: "response"

specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
description: >
44
Run `PUT /_ccr/auto_follow/my_auto_follow_pattern` to creates an auto-follow pattern.
55
# type: "request"
6-
value: "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}"
6+
value: "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}"
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# summary:
1+
# summary: ''
22
description: A successful response for creating an auto-follow pattern.
3-
# type: "response"
3+
# type: response
44
# response_code: 200
5-
value: "{\n \"acknowledged\" : true\n}""
5+
value:
6+
acknowledged": true
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# summary:
1+
# summary:
22
# method_request: POST /follower_index/_ccr/resume_follow
33
description: Run `POST /follower_index/_ccr/resume_follow` to resume the follower index.
44
# type: request
55
value: |-
6-
{
7-
"max_read_request_operation_count" : 1024,
8-
"max_outstanding_read_requests" : 16,
9-
"max_read_request_size" : "1024k",
10-
"max_write_request_operation_count" : 32768,
11-
"max_write_request_size" : "16k",
12-
"max_outstanding_write_requests" : 8,
13-
"max_write_buffer_count" : 512,
14-
"max_write_buffer_size" : "512k",
15-
"max_retry_delay" : "10s",
16-
"read_poll_timeout" : "30s"
17-
}
6+
{
7+
"max_read_request_operation_count" : 1024,
8+
"max_outstanding_read_requests" : 16,
9+
"max_read_request_size" : "1024k",
10+
"max_write_request_operation_count" : 32768,
11+
"max_write_request_size" : "16k",
12+
"max_outstanding_write_requests" : 8,
13+
"max_write_buffer_count" : 512,
14+
"max_write_buffer_size" : "512k",
15+
"max_retry_delay" : "10s",
16+
"read_poll_timeout" : "30s"
17+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# summary:
1+
# summary:
22
description: A successful response from resuming a folower index.
33
# type: response
44
# response_code: 200
55
value: |-
6-
{
7-
"acknowledged" : true
8-
}
6+
{
7+
"acknowledged" : true
8+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# summary:
1+
# summary:
22
# method_request: GET _cluster/allocation/explain
33
description: Run `GET _cluster/allocation/explain` to get an explanation for a shard's current allocation.
44
# type: request
55
value: |-
6-
{
7-
"index": "my-index-000001",
8-
"shard": 0,
9-
"primary": false,
10-
"current_node": "my-node"
11-
}
6+
{
7+
"index": "my-index-000001",
8+
"shard": 0,
9+
"primary": false,
10+
"current_node": "my-node"
11+
}

0 commit comments

Comments
 (0)