mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* [Fleet] Avoid breaking setup when compatible package is not available in registry (#125525)
(cherry picked from commit
|
||
---|---|---|
.. | ||
components | ||
paths | ||
bundled.json | ||
bundled.yaml | ||
entrypoint.yaml | ||
README.md | ||
validate_docs.test.ts |
OpenAPI (Experimental)
The current self-contained spec file is as JSON or as 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.
For example, online viewers for the specification like these:
View spec using MrinDoc | View spec using Swagger UI |
---|---|
![]() |
![]() |
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 links to the various files on disk.bundled.{yaml,json}
is the resolved output of that entry & other files in a single file. Typically the best choice as input to tools.- Paths: this defines each endpoint. A path can have one operation per http method.
- Components: Reusable components like
schemas
,responses
parameters
Tools
It is possible to validate the docs before bundling them with the following command:
npx swagger-cli validate x-pack/plugins/fleet/common/openapi/entrypoint.yaml
Then generate the bundled
files with the following:
```
npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml entrypoint.yaml
npx @redocly/openapi-cli bundle --ext json --output bundled.json entrypoint.yaml
```