kibana/oas_docs
Ying Mao dd90b67a87
[Response Ops][Actions] Remove deprecated HTTP APIs (#197510)
Resolves https://github.com/elastic/kibana/issues/90382

## Summary

Removes legacy action APIs for 9.0 and updates all tests that still used
the legacy APIs to use the current APIs. Also did some renaming of
action -> connector in the files I had to touch.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-29 15:20:12 -04:00
..
examples [OpenAPI][DOCS] Add descriptions, examples, responses for role APIs (#195527) 2024-10-25 10:13:57 -07:00
output [Response Ops][Actions] Remove deprecated HTTP APIs (#197510) 2024-10-29 15:20:12 -04:00
overlays [OpenAPI][DOCS] Add descriptions, examples, responses for role APIs (#195527) 2024-10-25 10:13:57 -07:00
scripts [OAS] Removing staging files (#197455) 2024-10-24 09:52:13 -05:00
.spectral.yaml [OAS][DOCS] Adds linting rule for missing property descriptions (#191594) 2024-08-29 09:44:29 +01:00
bundle.json [Response Ops][Actions] Remove deprecated HTTP APIs (#197510) 2024-10-29 15:20:12 -04:00
bundle.serverless.json [Response Ops][Actions] Remove deprecated HTTP APIs (#197510) 2024-10-29 15:20:12 -04:00
kibana.info.serverless.yaml [OAS][DOCS] Clarify license, version, and source URL (#192145) 2024-09-05 07:06:44 -07:00
kibana.info.yaml [OpenAPI] Add work in progress statement to API intro (#197703) 2024-10-24 14:38:33 -07:00
makefile [OAS] Removing staging files (#197455) 2024-10-24 09:52:13 -05:00
README.md [HTTP/OAS] Add Kibana OpenAPI bundling documentation (#195645) 2024-10-24 22:38:22 +02:00

Kibana API reference documentation

Documentation about our OpenAPI bundling workflow and configuration. See Kibana's hosted stateful and serverless docs.

Workflow

The final goal of this workflow is to produce an OpenAPI bundle containing all Kibana's public APIs.

Step 0

OAS from Kibana's APIs are continuously extracted and captured in bundle.json and bundle.serverless.json as fully formed OAS documentation. See node scripts/capture_oas_snapshot --help for more info.

These bundles form the basis of our OpenAPI bundles to which we append and layer extra information before publishing.

Step 1

Append pre-existing bundles not extracted from code using kbn-openapi-bundler to produce the final resulting bundles.

To add more files into the final bundle, edit the appropriate oas_docs/scripts/merge*.js files.

Step 2

Apply any final overalys to the document that might include examples or final tweaks (see the "Scripts" section for more details).

Scripts

The oas_docs/scripts folder contains scripts that point to the source domain-specific OpenAPI bundles and specify additional parameters for producing the final output bundle. Currently, there are the following scripts:

  • merge_ess_oas.js script produces production an output bundle for ESS

  • merge_serverless_oas.js script produces production an output bundle for Serverless

Output Kibana OpenAPI bundles

The oas_docs/output folder contains the final resulting Kibana OpenAPI bundles

  • kibana.yaml production ready ESS OpenAPI bundle
  • kibana.serverless.yaml production ready Serverless OpenAPI bundle

Bundling commands

Besides the scripts in the oas_docs/scripts folder, there is an oas_docs/makefile to simplify the workflow. The following makefile targets are available:

Command Description
api-docs Builds ESS Kibana OpenAPI bundle
api-docs-serverless Builds Serverless Kibana OpenAPI bundle
api-docs-lint Lints built result bundles
api-docs-lint-errs Lints built result bundles for errors
api-docs-preview Generates (ESS + Serverless) Kibana OpenAPI bundles preview
api-docs-overlay Applies overlays from overlays folder to the Kibana OpenAPI bundles and generate *.new.yaml files. Overlays help to fine tune the result bundles.
api-docs-overlay-preview Generates a preview for bundles produced by api-docs-overlay