diff --git a/.gitignore b/.gitignore index 68826241d8..1861b77072 100644 --- a/.gitignore +++ b/.gitignore @@ -69,4 +69,6 @@ compiler/test/**/output/ output/openapi/elasticsearch-serverless-openapi.tmp*.json output/openapi/elasticsearch-serverless-openapi.examples.json output/openapi/elasticsearch-openapi.tmp*.json -output/openapi/elasticsearch-openapi.examples.json \ No newline at end of file +output/openapi/elasticsearch-openapi.examples.json +output/openapi/elasticsearch-serverless-openapi-docs.json +output/openapi/elasticsearch-openapi-docs.json \ No newline at end of file diff --git a/Makefile b/Makefile index 17b184730e..fe2852a137 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,7 @@ transform-to-openapi: ## Generate the OpenAPI definition from the compiled schem transform-to-openapi-for-docs: ## Generate the OpenAPI definition tailored for API docs generation @npm run transform-to-openapi -- --schema output/schema/schema.json --flavor stack --lift-enum-descriptions --merge-multipath-endpoints --multipath-redirects --output output/openapi/elasticsearch-openapi-docs.json + @npm run transform-to-openapi -- --schema output/schema/schema.json --flavor serverless --lift-enum-descriptions --merge-multipath-endpoints --multipath-redirects --output output/openapi/elasticsearch-serverless-openapi-docs.json filter-for-serverless: ## Generate the serverless version from the compiled schema @npm run --prefix compiler filter-by-availability -- --serverless --visibility=public --input ../output/schema/schema.json --output ../output/output/openapi/elasticsearch-serverless-openapi.json diff --git a/README.md b/README.md index 9d883fa3b4..5c7aa9856b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,13 @@ Follow the steps to generate the JSON representation, then: ``` # Generate the OpenAPI representation $ make transform-to-openapi +``` + +To generate the JSON representation that is used for documentation purposes, the commands are different: + +``` +# Generate the OpenAPI files +$ make transform-to-openapi-for-docs # Apply fixes $ make overlay-docs