Skip to content

Commit 095ed44

Browse files
committed
Merge remote-tracking branch 'origin/main' into kderusso/move-query-rules-namespace
2 parents 152c4a2 + d6c38fe commit 095ed44

40 files changed

+381
-137
lines changed

.github/labeler.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
documentation:
2-
- '*.md'
2+
- changed-files:
3+
- any-glob-to-any-file: '*.md'
34

45
specification:
5-
- 'specification/**/*'
6+
- changed-files:
7+
- any-glob-to-any-file: 'specification/**/*'
68

79
generator:typescript:
8-
- 'typescript-generator/**/*'
10+
- changed-files:
11+
- any-glob-to-any-file: 'typescript-generator/**/*'
912

1013
compiler:
11-
- 'compiler/**/*'
12-
- 'compiler-rs/**/*'
14+
- changed-files:
15+
- any-glob-to-any-file: ['compiler/**/*', 'compiler-rs/**/*']

.github/workflows/code-format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212

13-
- name: Use Node.js 20.x
14-
uses: actions/setup-node@v1
13+
- name: Use Node.js 20
14+
uses: actions/setup-node@v4
1515
with:
16-
node-version: 20.x
16+
node-version: 20
1717

1818
- name: Install
1919
run: |

.github/workflows/compiler.test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Use Node.js 20.x
17-
uses: actions/setup-node@v1
16+
- name: Use Node.js 20
17+
uses: actions/setup-node@v4
1818
with:
19-
node-version: 20.x
19+
node-version: 20
2020

2121
- name: Install deps
2222
run: |

.github/workflows/generate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
token: ${{ secrets.PAT }}
3535
persist-credentials: true
3636

37-
- name: Setup Node 20.x
38-
uses: actions/setup-node@v3
37+
- name: Setup Node 20
38+
uses: actions/setup-node@v4
3939
with:
40-
node-version: 20.x
40+
node-version: 20
4141
cache: npm
4242
cache-dependency-path: '**/package-lock.json'
4343

.github/workflows/gh-pages-report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818

19-
- name: Use Node.js 20.x
20-
uses: actions/setup-node@v1
19+
- name: Use Node.js 20
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: 20.x
22+
node-version: 20
2323

2424
- name: Install
2525
run: |

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
triage:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/labeler@v3
9+
- uses: actions/labeler@v5
1010
with:
1111
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1212

.github/workflows/linter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212

13-
- name: Use Node.js 20.x
14-
uses: actions/setup-node@v1
13+
- name: Use Node.js 20
14+
uses: actions/setup-node@v4
1515
with:
16-
node-version: 20.x
16+
node-version: 20
1717

1818
- name: Install
1919
run: |

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
branch: ['main', '8.8', '8.7', '7.17']
15+
branch: ['main', '8.13', '8.14', '7.17']
1616

1717
steps:
1818
- uses: actions/checkout@v4
1919
with:
2020
ref: ${{ matrix.branch }}
2121

22-
- name: Use Node.js 20.x
23-
uses: actions/setup-node@v1
22+
- name: Use Node.js 20
23+
uses: actions/setup-node@v4
2424
with:
25-
node-version: 20.x
25+
node-version: 20
2626

2727
- name: Install deps
2828
run: |
@@ -43,19 +43,19 @@ jobs:
4343
git status --porcelain
4444
4545
- name: Create Pull Request
46-
uses: peter-evans/create-pull-request@v3
46+
uses: peter-evans/create-pull-request@v6
4747
with:
4848
title: Update rest-api-spec ${{ matrix.branch }}
4949
body: 'As titled.'
5050
commit-message: 'Update rest-api-spec'
5151
labels: specification
5252
delete-branch: true
53-
team-reviewers: elastic/clients-team
53+
team-reviewers: elastic/devtools-team
5454
branch: automated/rest-api-spec-update-${{ matrix.branch }}
5555

5656
- name: Open an issue if the action fails
5757
if: ${{ failure() }}
58-
uses: nashmaniac/create-issue-action@v1.1
58+
uses: nashmaniac/create-issue-action@v1.2
5959
with:
6060
title: rest-api-spec update failed
6161
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/validate-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
token: ${{ secrets.PAT }}
2727
ref: main
2828

29-
- name: Use Node.js 20.x
30-
uses: actions/setup-node@v1
29+
- name: Use Node.js 20
30+
uses: actions/setup-node@v4
3131
with:
32-
node-version: 20.x
32+
node-version: 20
3333

3434
- name: Install deps 1/2
3535
working-directory: ./clients-flight-recorder

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ dump-routes: ## Create a new schema with all generics expanded
6060
contrib: | generate license-check spec-format-fix transform-to-openapi ## Pre contribution target
6161

6262
lint-docs: ## Lint the OpenAPI documents
63-
@npx @stoplight/spectral-cli lint output/openapi/elasticsearch-serverless-openapi.json
63+
@npx @stoplight/spectral-cli lint output/openapi/*.json --ruleset .spectral.yaml
64+
65+
lint-docs-serverless: ## Lint only the serverless OpenAPI document
66+
@npx @stoplight/spectral-cli lint output/openapi/elasticsearch-serverless-openapi.json --ruleset .spectral.yaml
6467

6568
help: ## Display help
6669
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ Usage:
6969
spec-dangling-types Generate the dangling types rreport
7070
setup Install dependencies for contrib target
7171
clean-dep Clean npm dependencies
72+
transform-expand-generics Create a new schema with all generics expanded
73+
transform-to-openapi Generate the OpenAPI definition from the compiled schema
74+
filter-for-serverless Generate the serverless version from the compiled schema
75+
dump-routes Create a new schema with all generics expanded
7276
contrib Pre contribution target
77+
lint-docs Lint the OpenAPI documents
78+
lint-docs-serverless Lint only the serverless OpenAPI document
7379
help Display help
7480
```
7581

docs/doc-comments-guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ A specification is not only about formalizing data structures, it's also about e
44

55
Documentation of the TypeScript specification is made using [JSDoc](https://jsdoc.app/) comments, i.e. multiline comments starting with `/**` above a type or field declaration.
66

7+
The first phrase is used as the mandatory operation summary in the OpenAPI document.
8+
Refer to [API documentation guidelines](https://docs.elastic.dev/content-architecture/oas#summaries).
9+
10+
NOTE: You must add a period or `\n` at the end of the phrase for it to parse correctly.
11+
The period will be properly omitted from the output OpenAPI document.
12+
713
Additional lines start with a `*` followed by a space. Long lines are allowed but it's better if text is formatted to a maximum of 120 characters per line.
814

915
## Example
1016

1117
```ts
1218
/**
19+
* Get ranking evaluation.
1320
* Enables you to evaluate the quality of ranked search results over a set of typical search queries.
1421
* @rest_spec_name rank_eval
1522
* @availability stack since=6.2.0 stability=stable

output/openapi/elasticsearch-openapi.json

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11783,7 +11783,8 @@
1178311783
"tags": [
1178411784
"indices.get_index_template"
1178511785
],
11786-
"summary": "Returns information about one or more index templates",
11786+
"summary": "Get index templates",
11787+
"description": "Returns information about one or more index templates.",
1178711788
"externalDocs": {
1178811789
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html"
1178911790
},
@@ -11815,7 +11816,7 @@
1181511816
"tags": [
1181611817
"indices.put_index_template"
1181711818
],
11818-
"summary": "Creates or updates an index template",
11819+
"summary": "Create or update an index template",
1181911820
"description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.",
1182011821
"externalDocs": {
1182111822
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html"
@@ -11848,7 +11849,7 @@
1184811849
"tags": [
1184911850
"indices.put_index_template"
1185011851
],
11851-
"summary": "Creates or updates an index template",
11852+
"summary": "Create or update an index template",
1185211853
"description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.",
1185311854
"externalDocs": {
1185411855
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html"
@@ -11881,8 +11882,8 @@
1188111882
"tags": [
1188211883
"indices.delete_index_template"
1188311884
],
11884-
"summary": "The provided <index-template> may contain multiple template names separated by a comma",
11885-
"description": "If multiple template names are specified then there is no wildcard support and the provided names should match completely with existing templates.",
11885+
"summary": "Delete an index template",
11886+
"description": "The provided <index-template> may contain multiple template names separated by a comma. If multiple template names are specified then there is no wildcard support and the provided names should match completely with existing templates.",
1188611887
"externalDocs": {
1188711888
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html"
1188811889
},
@@ -11980,7 +11981,8 @@
1198011981
"tags": [
1198111982
"indices.get_template"
1198211983
],
11983-
"summary": "Retrieves information about one or more index templates",
11984+
"summary": "Get index templates",
11985+
"description": "Retrieves information about one or more index templates.",
1198411986
"externalDocs": {
1198511987
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html"
1198611988
},
@@ -12009,7 +12011,7 @@
1200912011
"tags": [
1201012012
"indices.put_template"
1201112013
],
12012-
"summary": "Creates or updates an index template",
12014+
"summary": "Create or update an index template",
1201312015
"description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.",
1201412016
"externalDocs": {
1201512017
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html"
@@ -12045,7 +12047,7 @@
1204512047
"tags": [
1204612048
"indices.put_template"
1204712049
],
12048-
"summary": "Creates or updates an index template",
12050+
"summary": "Create or update an index template",
1204912051
"description": "Index templates define settings, mappings, and aliases that can be applied automatically to new indices.",
1205012052
"externalDocs": {
1205112053
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html"
@@ -12136,7 +12138,8 @@
1213612138
"tags": [
1213712139
"indices.exists_template"
1213812140
],
12139-
"summary": "Returns information about whether a particular index template exists",
12141+
"summary": "Check existence of index templates",
12142+
"description": "Returns information about whether a particular index template exists.",
1214012143
"externalDocs": {
1214112144
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html"
1214212145
},
@@ -12975,7 +12978,8 @@
1297512978
"tags": [
1297612979
"indices.get_index_template"
1297712980
],
12978-
"summary": "Returns information about one or more index templates",
12981+
"summary": "Get index templates",
12982+
"description": "Returns information about one or more index templates.",
1297912983
"externalDocs": {
1298012984
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html"
1298112985
},
@@ -13426,7 +13430,8 @@
1342613430
"tags": [
1342713431
"indices.get_template"
1342813432
],
13429-
"summary": "Retrieves information about one or more index templates",
13433+
"summary": "Get index templates",
13434+
"description": "Retrieves information about one or more index templates.",
1343013435
"externalDocs": {
1343113436
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html"
1343213437
},
@@ -14355,6 +14360,8 @@
1435514360
"tags": [
1435614361
"indices.simulate_index_template"
1435714362
],
14363+
"summary": "Simulate an index",
14364+
"description": "Returns the index configuration that would be applied to the specified index from an existing index template.",
1435814365
"externalDocs": {
1435914366
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html"
1436014367
},
@@ -14425,7 +14432,8 @@
1442514432
"tags": [
1442614433
"indices.simulate_template"
1442714434
],
14428-
"summary": "Returns the index configuration that would be applied by a particular index template",
14435+
"summary": "Simulate an index template",
14436+
"description": "Returns the index configuration that would be applied by a particular index template.",
1442914437
"externalDocs": {
1443014438
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html"
1443114439
},
@@ -14456,7 +14464,8 @@
1445614464
"tags": [
1445714465
"indices.simulate_template"
1445814466
],
14459-
"summary": "Returns the index configuration that would be applied by a particular index template",
14467+
"summary": "Simulate an index template",
14468+
"description": "Returns the index configuration that would be applied by a particular index template.",
1446014469
"externalDocs": {
1446114470
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html"
1446214471
},

0 commit comments

Comments
 (0)