Skip to content

Add transform API examples via overlay #2755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ dump-routes: ## Create a new schema with all generics expanded
contrib: | generate license-check spec-format-fix transform-to-openapi filter-for-serverless ## Pre contribution target

overlay-docs: ## Apply overlays to OpenAPI documents
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.new.json"
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp.json"
@npx @redocly/cli bundle output/openapi/elasticsearch-serverless-openapi.tmp.json --ext json -o output/openapi/elasticsearch-serverless-openapi.examples.json
rm output/openapi/elasticsearch-serverless-openapi.tmp.json

lint-docs: ## Lint the OpenAPI documents
@npx @stoplight/spectral-cli lint output/openapi/*.json --ruleset .spectral.yaml
Expand Down
20 changes: 19 additions & 1 deletion docs/overlays/elasticsearch-serverless-openapi-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,23 @@ actions:
**Technical preview**
This functionality is in technical preview and may be changed or removed in a future release.
Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
- target: "$.paths['/_transform/{transform_id}']['put']"
description: "Update create transform operation"
update:
requestBody:
content:
application/json:
examples:
createTransformRequestExample1:
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample1.json"
createTransformRequestExample2:
$ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample2.json"
responses:
200:
content:
application/json:
examples:
createTransformResponseExample1:
$ref: "../../specification/transform/put_transform/examples/200_response/PutTransformResponseExample1.json"


Loading
Loading