Skip to content

Commit e36fe8a

Browse files
committed
docs(respect): add notes about severity configuration
1 parent 0743fba commit e36fe8a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/commands/respect.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,29 @@ npx @redocly/cli respect <your-test-file | multiple files | files bash query> [-
8383
You can also pass the server overrides as an environment variable, as in the following example:
8484
`REDOCLY_CLI_RESPECT_SERVER="test=https://test.com"`.
8585

86+
---
87+
88+
- --severity
89+
- string
90+
- Severity of the check.
91+
Customize the severity level of validation checks for status codes, schemas, and content types. This is useful when:
92+
93+
- You're actively developing your API and want to temporarily relax validation
94+
- You're testing new API behavior that doesn't match the current schema
95+
- You've encountered known issues that shouldn't block test execution
96+
- You want to treat certain validation failures as warnings instead of errors
97+
98+
The following checks can be configured: `STATUS_CODE_CHECK`, `SCHEMA_CHECK`, and `CONTENT_TYPE_CHECK`.
99+
The following severity values are available:
100+
101+
- `error`: Validation failures will cause the workflow to fail
102+
- `warn`: Validation failures will be logged as warnings but won't fail the workflow
103+
- `off`: Validation checks still run but their results are ignored
104+
105+
Note that setting severity to `off` does not prevent checks from executing - it only prevents their results from affecting the workflow outcome.
106+
For example, the following command will turn status code errors into warnings:
107+
`npx @redocly/cli respect test-file.yaml --severity='{"STATUS_CODE_CHECK":"warn"}'`.
108+
86109
{% /table %}
87110

88111
## Examples

0 commit comments

Comments
 (0)