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

Have SLO routes return a 403 instead of a 400 when user has an insufficient license #161193

Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 13 additions & 13 deletions x-pack/plugins/observability/docs/openapi/slo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ A guide about the OpenApi specification can be found at [https://swagger.io/docs

## The `openapi/slo` folder

* `entrypoint.yaml` is the overview file which pulls together all the paths and components.
* [Paths](paths/README.md): this defines each endpoint. A path can have one operation per http method.
* [Components](components/README.md): Reusable components
- `entrypoint.yaml` is the overview file which pulls together all the paths and components.
- [Paths](paths/README.md): this defines each endpoint. A path can have one operation per http method.
- [Components](components/README.md): Reusable components

## Tools

It is possible to validate the docs before bundling them with the following
command in the `x-pack/plugins/observability/docs/openapi/slo` folder:

```bash
npx swagger-cli validate entrypoint.yaml
```
```bash
npx swagger-cli validate entrypoint.yaml
```

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

```bash
npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml
npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json
```
```bash
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:

```bash
npx @redocly/cli lint bundled.json
```
```bash
npx @redocly/cli lint bundled.json
```
Loading