Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v2 open API spec for ml sync #136234

Merged
merged 11 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions x-pack/plugins/ml/common/openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ The current self-contained spec file can be used for online tools like those fou

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

The `ml_apis_v3.yaml` file uses OpenAPI Specification Version 3.0.

The `ml_apis_v2.json` file uses OpenAPI Specification Version 2.0.

## Tools

It is possible to validate the docs before bundling them by running the following command in the `x-pack/plugins/ml/common/openapi/` folder:
```
npx swagger-cli validate ml_apis.yaml
npx swagger-cli validate ml_apis_v3.yaml
```

Then generate the `bundled` files with the following commands:
You can optionally generate `bundled` files with the following commands:

```
npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml ml_apis.yaml
npx @redocly/openapi-cli bundle --ext json --output bundled.json ml_apis.yaml
npx @redocly/openapi-cli bundle --ext yaml --output bundled.yaml ml_apis_v3.yaml
npx @redocly/openapi-cli bundle --ext json --output bundled.json ml_apis_v3.yaml
```

251 changes: 0 additions & 251 deletions x-pack/plugins/ml/common/openapi/bundled.json

This file was deleted.

Loading