Files
redocly-cli/docs/commands/check-config.md
dianacheung 4c3d8cf84f docs: update commands documentation (issue 1429) and minor corrections (#1560)
* docs: updated commands documentation per issue 1429 and minor corrections, ran prettier

* docs: updated commands documentation per issue 1429 and included pr 1560 feedback

* docs: minor formatting and copyedits

---------

Co-authored-by: Diana Cheung <18452752+dianacheung@users.noreply.github.com>
Co-authored-by: Lorna Mitchell <lorna.mitchell@redocly.com>
2024-07-05 20:59:59 +01:00

40 lines
1.5 KiB
Markdown

# `check-config`
## Introduction
Use the `check-config` command to check that the content in a Redocly configuration file is valid and in the expected format.
Adding this check before using the configuration file with other commands can catch any problems at an early stage.
This command uses the same mechanism as our API linting to match a file against an expected data structure.
## Usage
```bash
redocly check-config
redocly check-config [--config=<path>]
```
## Options
| Option | Type | Description |
| ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| --config | string | Specify path to the [configuration file](#use-alternative-configuration-file). |
| --lint-config | string | Specify the severity level for the configuration file. <br/> **Possible values:** `warn`, `error`. Default value is `error`. |
## Examples
### Use default location for configuration file
By default, the CLI tool looks for the [Redocly configuration file](../configuration/index.md) in the current working directory.
```bash
redocly check-config
```
### Use alternative configuration file
Use the optional `--config` argument to provide an alternative path to a configuration file.
```bash
redocly check-config --config=./another/directory/config.yaml
```