Skip to content

Commit 2801b65

Browse files
authored
Merge branch 'main' into search-response-types
2 parents eb0a58d + 0b8119a commit 2801b65

26 files changed

+1145
-167
lines changed

.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/run-validations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const uploadRecordingsPath = path.join(__dirname, '..', '..', 'clients-flight-re
4949
const tsValidationPath = path.join(__dirname, '..', '..', 'clients-flight-recorder', 'scripts', 'types-validator')
5050
const DAY = 1000 * 60 * 60 * 24
5151
const specPath = path.join(__dirname, '..', 'specification')
52-
const outputPath = path.join(__dirname, '..', 'output/schema')
52+
const outputPath = path.join(__dirname, '..', 'output')
5353

5454
const apis = require('../output/schema/schema.json')
5555
.endpoints

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,71 @@ actions:
4040
examples:
4141
resetFeaturesResponseExample1:
4242
$ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json"
43-
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"

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

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,80 @@
11
# Overlays that are applicable to both Elasticsearch and Elasticsearch Serverless OpenAPI documents
22
overlay: 1.0.0
33
info:
4-
title: Overlays for examples that apply to both Elasticsearcb and Elasticsearch Serverless OpenAPI documents
4+
title: Overlays for changes that apply to both Elasticsearch and Elasticsearch Serverless OpenAPI documents
55
version: 0.0.1
66
actions:
7+
# Abbreviate and annotate items that are not shown in Bump.sh due to depth limits
8+
- target: "$.components['schemas']['ml._types:Datafeed'].properties.query"
9+
description: Remove query object from anomaly detection datafeed
10+
remove: true
11+
- target: "$.components['schemas']['ml._types:Datafeed'].properties"
12+
description: Re-add a simplified query object in anomaly detection datafeed
13+
update:
14+
query:
15+
x-abbreviated: true
16+
type: object
17+
description: >
18+
The Elasticsearch query domain-specific language (DSL).
19+
This value corresponds to the query object in an Elasticsearch search POST body.
20+
All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch.
21+
By default, this property has the following value: `{"match_all": {"boost": 1}}`.
22+
externalDocs:
23+
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
24+
description: Query DSL
25+
- target: "$.components['schemas']['ml._types:CategorizationAnalyzerDefinition'].properties.tokenizer"
26+
description: Remove tokenizer object from ML anomaly detection analysis config
27+
remove: true
28+
- target: "$.components['schemas']['ml._types:CategorizationAnalyzerDefinition'].properties"
29+
description: Re-add a simplified tokenizer object in anomaly detection analysis config
30+
update:
31+
tokenizer:
32+
x-abbreviated: true
33+
oneOf:
34+
- type: object
35+
- type: string
36+
description: >
37+
The name or definition of the tokenizer to use after character filters are applied.
38+
This property is compulsory if `categorization_analyzer` is specified as an object.
39+
Machine learning provides a tokenizer called `ml_standard` that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English.
40+
If you want to use that tokenizer but change the character or token filters, specify `"tokenizer": "ml_standard"` in your `categorization_analyzer`.
41+
Additionally, the `ml_classic` tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2).
42+
`ml_classic` was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify `"tokenizer": "ml_classic"` in your `categorization_analyzer`.
43+
externalDocs:
44+
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-tokenizers.html
45+
description: Tokenizer reference
46+
- target: "$.components['schemas']['ml._types:DataframeAnalyticsSource'].properties.query"
47+
description: Remove query object from data frame analytics source
48+
remove: true
49+
- target: "$.components['schemas']['ml._types:DataframeAnalyticsSource'].properties"
50+
description: Re-add a simplified query object in data frame analytics source
51+
update:
52+
query:
53+
x-abbreviated: true
54+
type: object
55+
description: >
56+
The Elasticsearch query domain-specific language (DSL).
57+
This value corresponds to the query object in an Elasticsearch search POST body.
58+
All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch.
59+
By default, this property has the following value: `{"match_all": {}}`.
60+
externalDocs:
61+
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
62+
description: Query DSL
63+
- target: "$.components['schemas']['transform._types:Source'].properties.query"
64+
description: Remove query object from transform source
65+
remove: true
66+
- target: "$.components['schemas']['transform._types:Source'].properties"
67+
description: Re-add a simplified query object in transform source
68+
update:
69+
query:
70+
x-abbreviated: true
71+
type: object
72+
description: >
73+
A query clause that retrieves a subset of data from the source index.
74+
externalDocs:
75+
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
76+
description: Query DSL
77+
# Examples
778
- target: "$.components['requestBodies']['async_search.submit']"
879
description: "Add example for asynch search submit request"
980
update:

0 commit comments

Comments
 (0)