Skip to content

Commit bec9a30

Browse files
committed
Convert examples to yaml and add subfolders
1 parent ea0411c commit bec9a30

File tree

27 files changed

+80
-89
lines changed

27 files changed

+80
-89
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ actions:
8989
application/json:
9090
examples:
9191
clusterAllocationExplainRequestExample1:
92-
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
92+
$ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml"
9393
- target: "$.components['responses']['cluster.health#200']"
9494
description: "Add examples for cluster health operation"
9595
update:
@@ -283,7 +283,7 @@ actions:
283283
application/json:
284284
examples:
285285
indicesCloseResponseExample1:
286-
$ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml"
286+
$ref: "../../specification/indices/close/examples/response/CloseIndexResponseExample1.yaml"
287287
- target: "$.components['responses']['indices.data_streams_stats#200']"
288288
description: "Add example for data stream stats response"
289289
update:

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,15 +1077,15 @@ actions:
10771077
application/json:
10781078
examples:
10791079
asyncSearchSubmitRequestExample1:
1080-
$ref: "../../specification/async_search/submit/AsyncSearchSubmitRequestExample1.json"
1080+
$ref: "../../specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml"
10811081
- target: "$.components['responses']['async_search.submit#200']"
10821082
description: "Add example for asynch search submit response"
10831083
update:
10841084
content:
10851085
application/json:
10861086
examples:
10871087
asyncSearchSubmitResponseExample1:
1088-
$ref: "../../specification/async_search/submit/AsyncSearchSubmitResponseExample1.json"
1088+
$ref: "../../specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml"
10891089
- target: "$.paths['/_transform/{transform_id}']['put']"
10901090
description: "Add examples for create transform operation"
10911091
update:
@@ -1334,7 +1334,7 @@ actions:
13341334
application/json:
13351335
examples:
13361336
indicesResolveResponseExample1:
1337-
$ref: "../../specification/indices/resolve_index/indicesResolveResponseExample1.yaml"
1337+
$ref: "../../specification/indices/resolve_index/examples/response/ResolveIndexResponseExample1.yaml"
13381338
- target: "$.components['requestBodies']['indices.rollover']"
13391339
description: "Add example for rollover index request"
13401340
update:

specification/async_search/submit/AsyncSearchSubmitRequestExample1.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

specification/async_search/submit/AsyncSearchSubmitResponseExample1.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# summary: "Performs a search request asynchronously."
2+
# method_request: "POST /sales*/_async_search?size=0"
3+
description: >
4+
Perform a search request asynchronously with `POST /sales*/_async_search?size=0`.
5+
It accepts the same parameters and request body as the search API.
6+
# type: "request",
7+
value: "{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# summary:
2+
description: A successful response when performing search asynchronously.
3+
# type: "response"
4+
# response_code: 200
5+
value: "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true,\n \"is_running\" : true,\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562,\n \"successful\" : 3,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483,\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}"

specification/ccr/follow/ccrApisFollowPutFollowRequestExample1.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

specification/ccr/follow/ccrApisFollowPutFollowRequestExample3.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# summary: "Create a follower index named `follower_index`."
2+
# method_request: "PUT /follower_index/_ccr/follow?wait_for_active_shards=1"
3+
description: Run `PUT /follower_index/_ccr/follow?wait_for_active_shards=1`."
4+
# type: "request"
5+
value: "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\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}"

0 commit comments

Comments
 (0)