Skip to content

Commit 1fa82d7

Browse files
authored
Merge branch 'main' into szabosteve/api-examples-p5
2 parents 855a1b7 + 85a1534 commit 1fa82d7

16 files changed

+245
-2
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,74 @@ actions:
4040
examples:
4141
resetFeaturesResponseExample1:
4242
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
43+
- target: "$.components['requestBodies']['cluster.allocation_explain']"
44+
description: "Add examples for cluster allocation explain operation"
45+
update:
46+
content:
47+
application/json:
48+
examples:
49+
clusterAllocationExplainRequestExample1:
50+
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
51+
- target: "$.components['responses']['cluster.health#200']"
52+
description: "Add examples for cluster health operation"
53+
update:
54+
content:
55+
application/json:
56+
examples:
57+
clusterHealthResponseExample1:
58+
$ref: "../../specification/cluster/health/clusterHealthResponseExample1.json"
59+
- target: "$.paths['/_cluster/settings']['put']"
60+
description: "Add examples for cluster update settings operation"
61+
update:
62+
requestBody:
63+
content:
64+
application/json:
65+
examples:
66+
clusterPutSettingsRequestExample1:
67+
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
68+
- target: "$.paths['/_cluster/reroute']['post']"
69+
description: "Add examples for cluster reroute operation"
70+
update:
71+
requestBody:
72+
content:
73+
application/json:
74+
examples:
75+
clusterRerouteRequestExample1:
76+
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
77+
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
78+
description: "Add examples for nodes reload secure settings operation"
79+
update:
80+
content:
81+
application/json:
82+
examples:
83+
clusterNodesReloadSecureSettingsRequestExample1:
84+
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json"
85+
- target: "$.components['responses']['nodes.reload_secure_settings#200']"
86+
description: "Add response examples for nodes reload secure settings operation"
87+
update:
88+
content:
89+
application/json:
90+
examples:
91+
clusterNodesReloadSecureSettingsResponseExample1:
92+
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json"
93+
- target: "$.paths['/_tasks']['get']"
94+
description: "Add examples for task management operation"
95+
update:
96+
responses:
97+
200:
98+
content:
99+
application/json:
100+
examples:
101+
getTasksResponseExample1:
102+
$ref: "../../specification/tasks/get/getTasksResponseExample1.json"
103+
- target: "$.components['responses']['nodes.info#200']"
104+
description: "Add response examples for nodes info"
105+
update:
106+
content:
107+
application/json:
108+
examples:
109+
nodesInfoResponseExample1:
110+
$ref: "../../specification/nodes/info/nodesInfoResponseExample1.yaml"
43111
- target: "$.paths['/_ilm/policy/{policy}']['delete']"
44112
description: "Add examples for delete lifecycle policy operation"
45113
update:

output/openapi/elasticsearch-openapi.json

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

output/openapi/elasticsearch-serverless-openapi.json

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

output/schema/schema-serverless.json

Lines changed: 39 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 39 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "Provides an explanation for a shard’s current allocation.",
3+
"method_request": "GET _cluster/allocation/explain",
4+
"description": "",
5+
"type": "request",
6+
"value": "{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "A successful response when requesting the health status of a cluster.",
3+
"description": "This is the API response in case of a quiet single node cluster with a single index with one shard and one replica.",
4+
"type": "response",
5+
"response_code": 200,
6+
"value": "{\n \"cluster_name\" : \"testcluster\",\n \"status\" : \"yellow\",\n \"timed_out\" : false,\n \"number_of_nodes\" : 1,\n \"number_of_data_nodes\" : 1,\n \"active_primary_shards\" : 1,\n \"active_shards\" : 1,\n \"relocating_shards\" : 0,\n \"initializing_shards\" : 0,\n \"unassigned_shards\" : 1,\n \"delayed_unassigned_shards\": 0,\n \"number_of_pending_tasks\" : 0,\n \"number_of_in_flight_fetch\": 0,\n \"task_max_waiting_in_queue_millis\": 0,\n \"active_shards_percent_as_number\": 50.0\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "Configures dynamic cluster settings.",
3+
"method_request": "PUT /_cluster/settings",
4+
"description": "An example of a persistent update.",
5+
"type": "request",
6+
"value": "{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"summary": "Changes the allocation of shards in a cluster.",
3+
"method_request": "POST /_cluster/reroute?metric=none",
4+
"description": "",
5+
"type": "request",
6+
"value": "{\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\", \"shard\": 0,\n \"from_node\": \"node1\", \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\", \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n}"
7+
}

0 commit comments

Comments
 (0)