Skip to content

Commit 69f5c63

Browse files
authored
Merge branch 'main' into google-vertexai-completion-chatcompletion
2 parents b1e749e + 00be10a commit 69f5c63

38 files changed

+5050
-62
lines changed

.github/validate-pr/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ async function run() {
9090
if (file.startsWith('specification/_spec_utils')) continue
9191
if (file.startsWith('specification/_doc_ids')) continue
9292
if (file.startsWith('specification/_json_spec')) continue
93-
if (file === 'specification/tsconfig.json') continue
93+
if (file.startsWith('specification/node_modules')) continue
94+
if (file.endsWith('tsconfig.json')) continue
95+
if (file.endsWith('eslint.config.js')) continue
96+
if (file.endsWith('package.json')) continue
97+
if (file.endsWith('package-lock.json')) continue
98+
if (file.endsWith('.md')) continue
9499
if (getApi(file).endsWith('_types')) {
95100
const apis = specification.endpoints
96101
.filter(endpoint => endpoint.name.split('.').filter(s => !privateNames.includes(s))[0] === getApi(file).split('.')[0])

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ SHELL := /bin/bash
22

33
validate: ## Validate a given endpoint request or response
44
@node compiler/run-validations.js --api $(api) --type $(type) --branch $(branch)
5+
@npm run lint --prefix specification
56

67
validate-no-cache: ## Validate a given endpoint request or response without local cache
78
@node compiler/run-validations.js --api $(api) --type $(type) --branch $(branch) --no-cache
@@ -39,6 +40,8 @@ setup: ## Install dependencies for contrib target
3940
@make clean-dep
4041
@npm install --prefix compiler
4142
@npm install --prefix typescript-generator
43+
@npm install --prefix validator
44+
@npm install --prefix specification
4245
@npm install @redocly/cli
4346

4447
clean-dep: ## Clean npm dependencies

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,9 @@ actions:
6060
security:
6161
- apiKeyAuth: []
6262
- basicAuth: []
63-
- bearerAuth: []
63+
- bearerAuth: []
64+
# Abbreviate and annotate items that are not shown in Bump.sh due to depth limits
65+
- target: "$.components['schemas']['_types.aggregations.RandomSamplerAggregation']"
66+
description: Add x-model
67+
update:
68+
x-model: true

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,10 +915,6 @@ actions:
915915
description: Add x-model
916916
update:
917917
x-model: true
918-
- target: "$.components['schemas']['_types.aggregations.RandomSamplerAggregation']"
919-
description: Add x-model
920-
update:
921-
x-model: true
922918
- target: "$.components['schemas']['_types.aggregations.RareTermsAggregation']"
923919
description: Add x-model
924920
update:
@@ -1066,6 +1062,16 @@ actions:
10661062
x-model: true
10671063
externalDocs:
10681064
url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/collapse-search-results
1065+
- target: "$.components['schemas']['indices._types.IndexSettings']"
1066+
description: Add x-model and externalDocs for IndexSettings component
1067+
update:
1068+
x-model: true
1069+
externalDocs:
1070+
description: Index settings
1071+
url: https://www.elastic.co/docs/reference/elasticsearch/index-settings/
1072+
- target: "$.components['schemas']['indices._types.IndexSettings'].properties"
1073+
description: Remove properties IndexSettings object
1074+
remove: true
10691075
# - target: "$.components['schemas']['_global.msearch.MultisearchBody'].properties"
10701076
# description: Add x-model
10711077
# update:

docs/specification-structure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Specification structure
22

33
The [`/specification`](../specification) folders follows a set of rules to
4-
keep the defintion easy to access and contribute, while maintaing
4+
keep the definition easy to access and contribute, while maintaining
55
the generated schema consistent and useful for language generators.
66

77
## Rules
@@ -14,7 +14,7 @@ root of the [`/specification`](../specification) folder as well
1414
as inside the namespaces when necessary.
1515

1616
You should decide if a type should go inside the top-level `_types`
17-
folder or inside a namespace (eg: `indices/_types`) on a case by case basis.
17+
folder or inside a namespace (e.g.: `indices/_types`) on a case by case basis.
1818
A good rule of thumb is that if a type is widely used in the specification,
1919
it should go in the top level `_types`, while if it's used only within
2020
a namespace or a few times in other namespaces, it could go inside the
@@ -29,8 +29,8 @@ end with `Request` or `Response`.
2929

3030
### Request and Response definitions
3131

32-
Request and Reponse definitions should be placed by structly following
33-
the rest-api-spec structure.
32+
Request and Response definitions should be placed by strictly following
33+
the `rest-api-spec` structure.
3434
For example, the request and response definition for `indices.put_mapping`
3535
should go in [`/specification/indices/put_mapping`](../specification/indices/put_mapping).
3636
There are no requirements on the file name, but the type should be
@@ -45,4 +45,4 @@ For example: [`/specification/_global/search`](../specification/_global/search).
4545
### Specification helpers
4646

4747
The specification has a set of custom types used to define complex structures
48-
or behaviors. Those types must be placed in [`/specification/_spec_utils`](../specification/_spec_utils).
48+
or behaviors. Those types must be placed in [`/specification/_spec_utils`](../specification/_spec_utils).

output/openapi/elasticsearch-openapi.json

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

0 commit comments

Comments
 (0)