Skip to content

Commit

Permalink
Have SLO routes return a 403 instead of a 400 when user has an insuff…
Browse files Browse the repository at this point in the history
…icient license (#161193)
  • Loading branch information
CoenWarmer authored Jul 4, 2023
1 parent bfab1b0 commit b128f26
Show file tree
Hide file tree
Showing 14 changed files with 2,524 additions and 76 deletions.
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

0 comments on commit b128f26

Please sign in to comment.