Skip to content

Commit 278c5be

Browse files
committed
Add overlays for cluster examples
1 parent 618f444 commit 278c5be

File tree

5 files changed

+66
-50
lines changed

5 files changed

+66
-50
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -82,40 +82,6 @@ actions:
8282
examples:
8383
resetFeaturesResponseExample1:
8484
$ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml"
85-
- target: "$.components['requestBodies']['cluster.allocation_explain']"
86-
description: "Add examples for cluster allocation explain operation"
87-
update:
88-
content:
89-
application/json:
90-
examples:
91-
clusterAllocationExplainRequestExample1:
92-
$ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml"
93-
- target: "$.components['responses']['cluster.health#200']"
94-
description: "Add examples for cluster health operation"
95-
update:
96-
content:
97-
application/json:
98-
examples:
99-
clusterHealthResponseExample1:
100-
$ref: "../../specification/cluster/health/examples/response/clusterHealthResponseExample1.yaml"
101-
- target: "$.paths['/_cluster/settings']['put']"
102-
description: "Add examples for cluster update settings operation"
103-
update:
104-
requestBody:
105-
content:
106-
application/json:
107-
examples:
108-
clusterPutSettingsRequestExample1:
109-
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
110-
- target: "$.paths['/_cluster/reroute']['post']"
111-
description: "Add examples for cluster reroute operation"
112-
update:
113-
requestBody:
114-
content:
115-
application/json:
116-
examples:
117-
clusterRerouteRequestExample1:
118-
$ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml"
11985
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
12086
description: "Add examples for nodes reload secure settings operation"
12187
update:
@@ -404,6 +370,51 @@ actions:
404370
examples:
405371
postBehavioralAnalyticsEventRequestExample1:
406372
$ref: "../../specification/search_application/post_behavioral_analytics_event/examples/request/BehavioralAnalyticsEventPostRequestExample1.yaml"
373+
## Examples for cluster
374+
- target: "$.components['requestBodies']['cluster.allocation_explain']"
375+
description: "Add example for cluster allocation exaplain request"
376+
update:
377+
content:
378+
application/json:
379+
examples:
380+
clusterAllocationExplainRequestExample1:
381+
$ref: "../../specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml"
382+
- target: "$.components['requestBodies']['cluster.allocation_explain']"
383+
description: "Add examples for cluster allocation explain operation"
384+
update:
385+
content:
386+
application/json:
387+
examples:
388+
clusterAllocationExplainRequestExample1:
389+
$ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml"
390+
- target: "$.components['responses']['cluster.health#200']"
391+
description: "Add examples for cluster health operation"
392+
update:
393+
content:
394+
application/json:
395+
examples:
396+
clusterHealthResponseExample1:
397+
$ref: "../../specification/cluster/health/examples/response/clusterHealthResponseExample1.yaml"
398+
- target: "$.paths['/_cluster/settings']['put']"
399+
description: "Add examples for cluster update settings operation"
400+
update:
401+
requestBody:
402+
content:
403+
application/json:
404+
examples:
405+
clusterPutSettingsRequestExample1:
406+
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml"
407+
clusterPutSettingsRequestExample2:
408+
$ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample2.yaml"
409+
- target: "$.paths['/_cluster/reroute']['post']"
410+
description: "Add examples for cluster reroute operation"
411+
update:
412+
requestBody:
413+
content:
414+
application/json:
415+
examples:
416+
clusterRerouteRequestExample1:
417+
$ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml"
407418
## Examples for esql
408419
- target: "$.paths['/_query/async']['post']"
409420
description: "Add examples for async esql query operation"
@@ -425,6 +436,15 @@ actions:
425436
examples:
426437
dataStreamLifecycleStatsResponseExample1:
427438
$ref: "../../specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml"
439+
## Examples for inference
440+
- target: "$.components['requestBodies']['inference.stream_inference']"
441+
description: "Add example for inference stream request"
442+
update:
443+
content:
444+
application/json:
445+
examples:
446+
streamInferenceRequestExample1:
447+
$ref: "../../specification/inference/stream_inference/examples/request/StreamInferenceRequestExample1.yaml"
428448
## Examples for ingest
429449
- target: "$.components['requestBodies']['simulate.ingest']"
430450
description: "Add example for simulate ingest request"
@@ -574,12 +594,4 @@ actions:
574594
examples:
575595
updateWatcherSettingsRequestExample1:
576596
$ref: "../../specification/watcher/get_settings/examples/200_response/WatcherGetSettingsResponseExample1.yaml"
577-
## Examples for inference
578-
- target: "$.components['requestBodies']['inference.stream_inference']"
579-
description: "Add example for inference stream request"
580-
update:
581-
content:
582-
application/json:
583-
examples:
584-
streamInferenceRequestExample1:
585-
$ref: "../../specification/inference/stream_inference/examples/request/StreamInferenceRequestExample1.yaml"
597+

output/schema/schema.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { Duration } from '@_types/Time'
3232
* @availability stack since=5.0.0 stability=stable
3333
* @availability serverless stability=stable visibility=private
3434
* @doc_id cluster-allocation-explain
35+
* @doc_tag cluster
3536
*/
3637
export interface Request extends RequestBase {
3738
urls: [

specification/cluster/health/ClusterHealthRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { Duration } from '@_types/Time'
3131

3232
/**
3333
* Get the cluster health status.
34+
*
3435
* You can also use the API to get the health status of only specified data streams and indices.
3536
* For data streams, the API retrieves the health status of the stream’s backing indices.
3637
*

specification/cluster/put_settings/ClusterPutSettingsRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { Duration } from '@_types/Time'
2424

2525
/**
2626
* Update the cluster settings.
27+
*
2728
* Configure and update dynamic settings on a running cluster.
2829
* You can also configure dynamic settings locally on an unstarted or shut down node in `elasticsearch.yml`.
2930
*

0 commit comments

Comments
 (0)