kibana/packages/core/saved-objects/docs/openapi
2023-08-25 12:48:55 -07:00
..
components [OAS] Add deprecated saved object APIs (#164355) 2023-08-25 12:48:55 -07:00
paths [OAS] Add deprecated saved object APIs (#164355) 2023-08-25 12:48:55 -07:00
bundled.json [OAS] Add deprecated saved object APIs (#164355) 2023-08-25 12:48:55 -07:00
bundled.yaml [OAS] Add deprecated saved object APIs (#164355) 2023-08-25 12:48:55 -07:00
entrypoint.yaml [OAS] Add deprecated saved object APIs (#164355) 2023-08-25 12:48:55 -07:00
README.md [OAS] Add saved objects openAPI folder (#162522) 2023-08-16 16:01:50 -07:00

OpenAPI (Experimental)

The current self-contained spec file is bundled.json or bundled.yaml and can be used for online tools like those found at https://openapi.tools/. This spec is experimental and may be incomplete or change later.

A guide about the openApi specification can be found at https://swagger.io/docs/specification/about/.

The openapi folder

  • entrypoint.yaml is the overview file which pulls together all the paths and components.
  • Paths: this defines each endpoint. A path can have one operation per http method.

Tools

To validate and bundle the docs, you can use Redocly and Swagger/OpenAPI CLI.

For example, run the following commands from the packages/core/saved-objects/docs/openapi/ folder:

npx swagger-cli validate entrypoint.yaml

Then you can generate the bundled files by running the following commands:

npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml
npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json

After generating the json bundle ensure that it is also valid by running the following command:

npx @redocly/cli lint bundled.json