Skip to content

Commit 65ea48c

Browse files
authored
Merge branch 'main' into global-tags
2 parents f612690 + bf8b9d8 commit 65ea48c

File tree

55 files changed

+5786
-2007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5786
-2007
lines changed

.github/workflows/update-rest-api-json.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
branch: ['main', '8.14', '8.15', '7.17']
16+
branch: ['main', '8.x', '8.15', '7.17']
1717

1818
steps:
1919
- uses: actions/checkout@v4

.github/workflows/validate-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
branches:
66
- main
7+
- 8.x
8+
- '[0-9]+.[0-9]+'
79

810
jobs:
911
validate-pr:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ contrib: | generate license-check spec-format-fix transform-to-openapi filter-fo
6161

6262
overlay-docs: ## Apply overlays to OpenAPI documents
6363
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp1.json"
64-
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-example-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp2.json"
64+
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp2.json"
6565
@npx @redocly/cli bundle output/openapi/elasticsearch-serverless-openapi.tmp2.json --ext json -o output/openapi/elasticsearch-serverless-openapi.examples.json
6666
@npx bump overlay "output/openapi/elasticsearch-openapi.json" "docs/overlays/elasticsearch-openapi-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp1.json"
67-
@npx bump overlay "output/openapi/elasticsearch-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-example-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp2.json"
67+
@npx bump overlay "output/openapi/elasticsearch-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp2.json"
6868
@npx @redocly/cli bundle output/openapi/elasticsearch-openapi.tmp2.json --ext json -o output/openapi/elasticsearch-openapi.examples.json
6969
rm output/openapi/elasticsearch-serverless-openapi.tmp*.json
7070
rm output/openapi/elasticsearch-openapi.tmp*.json

compiler-rs/clients_schema_to_openapi/src/paths.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ pub fn add_endpoint(
4747
}
4848

4949
// Namespace
50-
// let namespace = match endpoint.name.split_once('.') {
51-
// Some((ns, _)) => ns,
52-
// None => "core",
53-
//};
50+
let namespace = match endpoint.name.split_once('.') {
51+
Some((ns, _)) => ns,
52+
None => &endpoint.name,
53+
};
5454

5555
// Will we produce multiple paths? If true, we will register components for reuse across paths
5656
let is_multipath = endpoint.urls.len() > 1 || endpoint.urls.iter().any(|u| u.methods.len() > 1);
@@ -196,7 +196,7 @@ pub fn add_endpoint(
196196

197197
// Create the operation, it will be repeated if we have several methods
198198
let operation = openapiv3::Operation {
199-
tags: vec![endpoint.name.clone()],
199+
tags: vec![namespace.to_string()],
200200
summary: sum_desc.summary,
201201
description: sum_desc.description,
202202
external_docs: tac.convert_external_docs(endpoint),
192 Bytes
Binary file not shown.

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 187 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,4 +304,190 @@ actions:
304304
examples:
305305
resetFeaturesResponseExample1:
306306
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
307-
307+
- target: "$.components['requestBodies']['cluster.allocation_explain']"
308+
description: "Add examples for cluster allocation explain operation"
309+
update:
310+
content:
311+
application/json:
312+
examples:
313+
clusterAllocationExplainRequestExample1:
314+
$ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json"
315+
- target: "$.components['responses']['cluster.health#200']"
316+
description: "Add examples for cluster health operation"
317+
update:
318+
content:
319+
application/json:
320+
examples:
321+
clusterHealthResponseExample1:
322+
$ref: "../../specification/cluster/health/clusterHealthResponseExample1.json"
323+
- target: "$.paths['/_cluster/settings']['put']"
324+
description: "Add examples for cluster update settings operation"
325+
update:
326+
requestBody:
327+
content:
328+
application/json:
329+
examples:
330+
clusterPutSettingsRequestExample1:
331+
$ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json"
332+
- target: "$.paths['/_cluster/reroute']['post']"
333+
description: "Add examples for cluster reroute operation"
334+
update:
335+
requestBody:
336+
content:
337+
application/json:
338+
examples:
339+
clusterRerouteRequestExample1:
340+
$ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json"
341+
- target: "$.components['requestBodies']['nodes.reload_secure_settings']"
342+
description: "Add examples for nodes reload secure settings operation"
343+
update:
344+
content:
345+
application/json:
346+
examples:
347+
clusterNodesReloadSecureSettingsRequestExample1:
348+
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json"
349+
- target: "$.components['responses']['nodes.reload_secure_settings#200']"
350+
description: "Add response examples for nodes reload secure settings operation"
351+
update:
352+
content:
353+
application/json:
354+
examples:
355+
clusterNodesReloadSecureSettingsResponseExample1:
356+
$ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json"
357+
- target: "$.paths['/_tasks']['get']"
358+
description: "Add examples for task management operation"
359+
update:
360+
responses:
361+
200:
362+
content:
363+
application/json:
364+
examples:
365+
getTasksResponseExample1:
366+
$ref: "../../specification/tasks/get/getTasksResponseExample1.json"
367+
- target: "$.components['responses']['nodes.info#200']"
368+
description: "Add response examples for nodes info"
369+
update:
370+
content:
371+
application/json:
372+
examples:
373+
nodesInfoResponseExample1:
374+
$ref: "../../specification/nodes/info/nodesInfoResponseExample1.yaml"
375+
- target: "$.paths['/_ilm/policy/{policy}']['delete']"
376+
description: "Add examples for delete lifecycle policy operation"
377+
update:
378+
responses:
379+
200:
380+
content:
381+
application/json:
382+
examples:
383+
deleteLifecycleResponseExample1:
384+
$ref: "../../specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json"
385+
- target: "$.paths['/_ilm/policy/{policy}']['put']"
386+
description: "Add examples for create a lifecycle operation"
387+
update:
388+
update:
389+
requestBody:
390+
content:
391+
application/json:
392+
examples:
393+
putLifecycleRequestExample1:
394+
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json"
395+
responses:
396+
200:
397+
content:
398+
application/json:
399+
examples:
400+
putLifecycleResponseExample1:
401+
$ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json"
402+
- target: "$.components['responses']['ilm.get_lifecycle#200']"
403+
description: "Add examples for get lifecycle policy operation"
404+
update:
405+
content:
406+
application/json:
407+
examples:
408+
getLifecycleResponseExample1:
409+
$ref: "../../specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json"
410+
- target: "$.paths['/_ilm/migrate_to_data_tiers']['post']"
411+
description: "Add examples for migrate to data tiers routing operation"
412+
update:
413+
update:
414+
requestBody:
415+
content:
416+
application/json:
417+
examples:
418+
migrateToDataTiersRequestExample1:
419+
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json"
420+
responses:
421+
200:
422+
content:
423+
application/json:
424+
examples:
425+
migrateToDataTiersResponseExample1:
426+
$ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json"
427+
- target: "$.paths['/_ilm/move/{index}']['post']"
428+
description: "Add examples for move to lifecycle step operation"
429+
update:
430+
update:
431+
requestBody:
432+
content:
433+
application/json:
434+
examples:
435+
moveToStepRequestExample1:
436+
$ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json"
437+
responses:
438+
200:
439+
content:
440+
application/json:
441+
examples:
442+
moveToStepResponseExample1:
443+
$ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json"
444+
- target: "$.paths['/_ilm/start']['post']"
445+
description: "Add examples for start index lifecycle management operation"
446+
update:
447+
responses:
448+
200:
449+
content:
450+
application/json:
451+
examples:
452+
startILMResponseExample1:
453+
$ref: "../../specification/ilm/start/StartILMResponseExample1.json"
454+
- target: "$.paths['/_ilm/stop']['post']"
455+
description: "Add examples for stop index lifecycle management operation"
456+
update:
457+
responses:
458+
200:
459+
content:
460+
application/json:
461+
examples:
462+
stopILMResponseExample1:
463+
$ref: "../../specification/ilm/stop/stopILMResponseExample1.json"
464+
- target: "$.paths['/_ilm/status']['get']"
465+
description: "Add examples for get index lifecycle management status operation"
466+
update:
467+
responses:
468+
200:
469+
content:
470+
application/json:
471+
examples:
472+
getILMStatusResponseExample1:
473+
$ref: "../../specification/ilm/get_status/GetILMStatusResponseExample1.json"
474+
- target: "$.paths['/{index}/_ilm/explain']['get']"
475+
description: "Add examples for explain lifecycle operation"
476+
update:
477+
responses:
478+
200:
479+
content:
480+
application/json:
481+
examples:
482+
explainLifecycleResponseExample1:
483+
$ref: "../../specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json"
484+
- target: "$.paths['/{index}/_ilm/remove']['post']"
485+
description: "Add examples for remove policy from index operation"
486+
update:
487+
responses:
488+
200:
489+
content:
490+
application/json:
491+
examples:
492+
removePolicyResponseExample1:
493+
$ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json"

docs/overlays/elasticsearch-shared-example-overlays.yaml

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

0 commit comments

Comments
 (0)