Skip to content

Commit 2727cfc

Browse files
[Backport 9.0] Add elasticsearch-serverless-openapi-docs.json (#4547)
1 parent 694a7cf commit 2727cfc

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ compiler/test/**/output/
6969
output/openapi/elasticsearch-serverless-openapi.tmp*.json
7070
output/openapi/elasticsearch-serverless-openapi.examples.json
7171
output/openapi/elasticsearch-openapi.tmp*.json
72-
output/openapi/elasticsearch-openapi.examples.json
72+
output/openapi/elasticsearch-openapi.examples.json
73+
output/openapi/elasticsearch-serverless-openapi-docs.json
74+
output/openapi/elasticsearch-openapi-docs.json

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,9 @@ dump-routes: ## Create a new schema with all generics expanded
6262
@npm run dump-routes --prefix compiler
6363

6464
overlay-docs: ## Apply overlays to OpenAPI documents
65-
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp1.json"
66-
@npx bump overlay "output/openapi/elasticsearch-serverless-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.tmp2.json"
67-
@npx @redocly/cli bundle output/openapi/elasticsearch-serverless-openapi.tmp2.json --ext json -o output/openapi/elasticsearch-serverless-openapi.examples.json
6865
@npx bump overlay "output/openapi/elasticsearch-openapi.json" "docs/overlays/elasticsearch-openapi-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp1.json"
6966
@npx bump overlay "output/openapi/elasticsearch-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp2.json"
7067
@npx @redocly/cli bundle output/openapi/elasticsearch-openapi.tmp2.json --ext json -o output/openapi/elasticsearch-openapi.examples.json
71-
rm output/openapi/elasticsearch-serverless-openapi.tmp*.json
7268
rm output/openapi/elasticsearch-openapi.tmp*.json
7369

7470
lint-docs: ## Lint the OpenAPI documents after overlays
@@ -77,9 +73,6 @@ lint-docs: ## Lint the OpenAPI documents after overlays
7773
lint-docs-stateful: ## Lint only the elasticsearch-openapi.examples.json file
7874
@npx @redocly/cli lint "output/openapi/elasticsearch-openapi.examples.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500
7975

80-
lint-docs-serverless: ## Lint only the serverless OpenAPI document after overlays
81-
@npx @redocly/cli lint "output/openapi/elasticsearch-serverless-openapi.examples.json" --config "docs/linters/redocly.yaml" --format stylish --max-problems 500
82-
8376
contrib: | generate license-check spec-format-fix transform-to-openapi filter-for-serverless lint-docs ## Pre contribution target
8477

8578
help: ## Display help

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ Follow the steps to generate the JSON representation, then:
6060
```
6161
# Generate the OpenAPI representation
6262
$ make transform-to-openapi
63+
```
64+
65+
To generate the JSON representation that is used for documentation purposes, the commands are different:
66+
67+
```
68+
# Generate the OpenAPI files
69+
$ make transform-to-openapi-for-docs
6370
6471
# Apply fixes
6572
$ make overlay-docs

0 commit comments

Comments
 (0)