Skip to content

Commit b040f69

Browse files
committed
Add transform API via overlay
1 parent b2a058a commit b040f69

File tree

3 files changed

+62519
-0
lines changed

3 files changed

+62519
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ contrib: | generate license-check spec-format-fix transform-to-openapi ## Pre co
5858
bump:
5959
@echo ">> bumping..."
6060
.ci/bump.sh
61+
62+
overlay-docs: ## Apply overlays to OpenAPI documents
63+
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp.json"
64+
@npx @redocly/cli bundle output/openapi/elasticsearch-serverless-openapi.tmp.json --ext json -o output/openapi/elasticsearch-serverless-openapi.examples.json
65+
rm output/openapi/elasticsearch-serverless-openapi.tmp.json
66+
67+
lint-docs: ## Lint the OpenAPI documents
68+
@npx @stoplight/spectral-cli lint output/openapi/*.json --ruleset .spectral.yaml
69+
70+
lint-docs-serverless: ## Lint only the serverless OpenAPI document
71+
@npx @stoplight/spectral-cli lint output/openapi/elasticsearch-serverless-openapi.json --ruleset .spectral.yaml
6172

6273
help: ## Display help
6374
@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)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# overlays.yaml
2+
overlay: 1.0.0
3+
info:
4+
title: Overlays for the Elasticsearch Serverless OpenAPI document
5+
version: 0.0.1
6+
actions:
7+
- target: '$.info'
8+
description: Add a document description
9+
update:
10+
description: >
11+
**Technical preview**
12+
This functionality is in technical preview and may be changed or removed in a future release.
13+
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
14+
- target: "$.paths['/_transform/{transform_id}']['put']"
15+
description: "Update create transform operation"
16+
update:
17+
requestBody:
18+
content:
19+
application/json:
20+
examples:
21+
createTransformRequestExample1:
22+
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample1.json"
23+
createTransformRequestExample2:
24+
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample2.json"
25+
responses:
26+
200:
27+
content:
28+
application/json:
29+
examples:
30+
createTransformResponseExample1:
31+
$ref: "../../specification/transform/put_transform/examples/200_response/PutTransformResponseExample1.json"
32+
33+

0 commit comments

Comments
 (0)