Skip to content

Commit bd1039d

Browse files
Cleanup the Fleet OpenAPI readme (#143143) (#143148)
(cherry picked from commit 54879f4) Co-authored-by: DeDe Morton <dede.morton@elastic.co>
1 parent 45564b9 commit bd1039d

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# OpenAPI (Experimental)
22

3-
The current self-contained spec file is [as JSON](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json) or [as YAML](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/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.
3+
> **_NOTE:_** This spec is experimental and may be incomplete or change later.
44
5-
For example, online viewers for the specification like these:
5+
The current self-contained spec file, available [as JSON](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json) or [as YAML](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.yaml), can be used for online tools like those found at https://openapi.tools/.
66

7-
| <a href="https://mrin9.github.io/OpenAPI-Viewer/#/load/https%3A%2F%2Fraw.githubusercontent.com%2Felastic%2Fkibana%2Fmaster%2Fx-pack%2Fplugins%2Ffleet%2Fcommon%2Fopenapi%2Fbundled.json">View spec using MrinDoc</a> | <a href="https://petstore.swagger.io/?url=https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json">View spec using Swagger UI</a> |
8-
|----|----|
9-
| <img alt="Screen Shot 2021-03-09 at 10 14 52 AM" src="https://user-images.githubusercontent.com/57655/110493024-8944dd80-80c0-11eb-97b2-0666fcca3b09.png"> | <img alt="Screen Shot 2021-03-09 at 10 14 04 AM" src="https://user-images.githubusercontent.com/57655/110493019-88ac4700-80c0-11eb-982b-d5d352143003.png"> |
7+
For example, [click here to view the specification in the Swagger UI](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/fleet/common/openapi/bundled.json).
108

119
A guide about the openApi specification can be found at [https://swagger.io/docs/specification/about/](https://swagger.io/docs/specification/about/).
10+
1211
## The `openapi` folder
1312

1413
* `entrypoint.yaml` is the overview file which links to the various files on disk.
@@ -18,15 +17,15 @@ A guide about the openApi specification can be found at [https://swagger.io/docs
1817
[`responses`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject)
1918
[`parameters`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject)
2019

21-
## Tools
20+
## Tools
2221
It is possible to validate the docs before bundling them with the following command:
2322
```
24-
npx swagger-cli validate x-pack/plugins/fleet/common/openapi/entrypoint.yaml
23+
npx swagger-cli validate x-pack/plugins/fleet/common/openapi/entrypoint.yaml
2524
```
2625

2726
Then generate the `bundled` files with the following:
2827

29-
```
30-
npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml entrypoint.yaml
31-
npx @redocly/openapi-cli bundle --ext json --output bundled.json entrypoint.yaml
32-
```
28+
```
29+
npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml entrypoint.yaml
30+
npx @redocly/openapi-cli bundle --ext json --output bundled.json entrypoint.yaml
31+
```

0 commit comments

Comments
 (0)