You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,7 @@ It only checks links within the local docs (it can't check links to other docs s
160
160
161
161
## Built-in rules changes
162
162
163
-
After adding a new rule, make sure it is added to the `minimal`, `recommended`, `recommended-strict` (the same as the previous but with warnings turned into error) and `all` rulesets with appropriate severity levels.
163
+
After adding a new rule, make sure it is added to the `minimal`, `recommended`, `recommended-strict` (the same as the previous but with warnings turned into error), `spec`, and `all` rulesets with appropriate severity levels.
164
164
The defaults are `off` for `minimal` and `recommended` and `error` for `all`.
165
165
Also add the rule to the built-in rules list in [the config types tree](./packages/core/src/types/redocly-yaml.ts).
| apis |[string]| Array of API or Arazzo description filenames that need to be linted. See [the API section](#specify-api) for more options. |
30
-
| --config | string | Specify path to the [configuration file](#use-custom-configuration-file). |
31
-
| --extends |[string]|[Extend a specific configuration](#extend-configuration) (defaults or config file settings). Build-in rulesets are: `minimal`, `recommended`, `recommended-strict`. Default value is `recommended`. |
32
-
| --format | string | Format for the output.<br />**Possible values:**`codeframe`, `stylish`, `json`, `checkstyle`, `codeclimate`, `github-actions`, `markdown`, `summary`. Default value is `codeframe`. |
| --lint-config | string | Specify the severity level for the configuration file. <br/> **Possible values:**`warn`, `error`, `off`. Default value is `warn`. |
36
-
| --max-problems | integer | Truncate output to display the specified [maximum number of problems](#limit-the-displayed-problems-count). Default value is 100. |
37
-
| --skip-preprocessor |[string]| Ignore certain preprocessors. See the [Skip preprocessor or rule section](#skip-preprocessor-or-rule) below. |
38
-
| --skip-rule |[string]| Ignore certain rules. See the [Skip preprocessor or rule section](#skip-preprocessor-or-rule) below. |
| apis |[string]| Array of API or Arazzo description filenames that need to be linted. See [the API section](#specify-api) for more options. |
30
+
| --config | string | Specify path to the [configuration file](#use-custom-configuration-file). |
31
+
| --extends |[string]|[Extend a specific configuration](#extend-configuration) (defaults or config file settings). Build-in rulesets are: `spec`, `minimal`, `recommended`, `recommended-strict`. Default value is `recommended`. |
32
+
| --format | string | Format for the output.<br />**Possible values:**`codeframe`, `stylish`, `json`, `checkstyle`, `codeclimate`, `github-actions`, `markdown`, `summary`. Default value is `codeframe`. |
| --lint-config | string | Specify the severity level for the configuration file. <br/> **Possible values:**`warn`, `error`, `off`. Default value is `warn`. |
36
+
| --max-problems | integer | Truncate output to display the specified [maximum number of problems](#limit-the-displayed-problems-count). Default value is 100. |
37
+
| --skip-preprocessor |[string]| Ignore certain preprocessors. See the [Skip preprocessor or rule section](#skip-preprocessor-or-rule) below. |
38
+
| --skip-rule |[string]| Ignore certain rules. See the [Skip preprocessor or rule section](#skip-preprocessor-or-rule) below. |
The `--extends` option allows you to extend the existing configuration.
116
-
This option accepts one of the following values: `minimal`, `recommended`, or `recommended-strict`.
116
+
This option accepts one of the following values: `minimal`, `recommended`, `recommended-strict`, or `spec`.
117
117
Each of the values is a base set of rules that the `lint` command uses.
118
118
You can further modify this set in cases when you want to have your own set of rules based on the existing one, including particular rules that cover your specific needs.
119
119
For more details, see [rulesets](../rules.md).
@@ -304,8 +304,8 @@ Running the `lint` command with `--format=markdown` produces output like the fol
304
304
305
305
| Severity | Location | Problem | Message |
306
306
|---|---|---|---|
307
-
| error | line 42:11 | [struct](https://redocly.com/docs/cli/rules/oas/struct) | Must contain at least one of the following fields: schema, content. |
308
-
| error | line 44:11 | [struct](https://redocly.com/docs/cli/rules/oas/struct) | Property `type` is not expected here. |
307
+
| error | line 42:11 | [struct](https://redocly.com/docs/cli/rules/common/struct) | Must contain at least one of the following fields: schema, content. |
308
+
| error | line 44:11 | [struct](https://redocly.com/docs/cli/rules/common/struct) | Property `type` is not expected here. |
309
309
310
310
Validation failed
311
311
Errors: 2
@@ -369,7 +369,7 @@ Example of an ignore file:
369
369
370
370
```yaml .redocly.lint-ignore.yaml file
371
371
# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.
372
-
# See https://redoc.ly/docs/cli/ for more information.
372
+
# See https://redocly.com/docs/cli/ for more information.
Copy file name to clipboardExpand all lines: docs/@v2/guides/configure-rules.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ In this guide, learn how to choose and adapt the rules built into Redocly for yo
10
10
11
11
To get started, try one of the existing rulesets and see if it meets your needs.
12
12
13
+
- The [`spec`](../rules/spec-ruleset.md) ruleset follows the OpenAPI specification.
13
14
- The [`recommended`](../rules/recommended.md) ruleset has a good basic set of rules for a consistent, user-friendly API.
14
15
- The [recommended-strict](../rules/recommended.md#recommended-strict-ruleset) ruleset is identical to the `recommended`, except it elevates all warnings to errors so that you don't miss the warnings, i.e. in a CI pipeline.
15
16
- Or try the [`minimal`](../rules/minimal.md) ruleset which shows some warnings, but far fewer errors that would cause the lint to fail.
Copy file name to clipboardExpand all lines: docs/@v2/guides/lint-arazzo.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ run `redocly lint --generate-ignore-file` to add all problems to the ignore file
70
70
71
71
## Configure the linting rules
72
72
73
-
Choose from the ready-made rulesets (`minimal`, `recommended` or `recommended-strict`), or go one better and configure the rules that suit your use case.
73
+
Choose from the ready-made rulesets (`spec`, `minimal`, `recommended` or `recommended-strict`), or go one better and configure the rules that suit your use case.
74
74
There's a full [list of built-in rules for Arazzo](../rules/built-in-rules.md#arazzo-rules) to refer to.
75
75
76
76
Add the rules to `redocly.yaml`, but for Arazzo specifications, the rules go in their own configuration section called `arazzoRules`.
Copy file name to clipboardExpand all lines: docs/@v2/quickstart.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,17 +63,17 @@ You have 1 warning.
63
63
64
64
The output shows any aspects where the OpenAPI doesn't meet the standard. If you get too much output, try adding the `--format summary` parameter to the command.
65
65
66
-
Feeling brave and highly API compliant? Try the `recommended`standard instead and see how yours measures up.
66
+
Feeling brave and highly API compliant? Try the `recommended`or `spec` ruleset instead and see how yours measures up.
67
67
68
68
## Craft a custom ruleset
69
69
70
70
Redocly CLI has some [great built-in rules](./rules/built-in-rules.md), and you can use these to build up a ruleset that works for you.
71
71
72
-
For example, let's build a lightweight ruleset using the [minimal ruleset](./rules/minimal.md) and adding some built-in rules to create a custom ruleset. You can see an example in the following snippet:
72
+
For example, let's build a lightweight ruleset using the [spec ruleset](./rules/spec-ruleset.md) and adding some built-in rules to create a custom ruleset. You can see an example in the following snippet:
Copy file name to clipboardExpand all lines: docs/@v2/rules.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ Redocly uses rules to describe all the different aspects of API behavior that we
16
16
17
17
Rulesets are groups of rules that are applied together, and APIs can be checked against as many rulesets as needed during linting. To get you started, there are some built-in rulesets:
18
18
19
-
- Our [recommended](./rules/recommended.md) ruleset is our unabashedly opinionated recommendation of what we think a good API looks like. It's a great place to start, before adapting to your own context.
19
+
- Our [spec](./rules/spec-ruleset.md) ruleset follows the OpenAPI specification as closely as possible and is a good starting point to build your own standards on top of it.
20
+
- A [recommended](./rules/recommended.md) ruleset is our unabashedly opinionated recommendation of what we think a good API looks like. It's a great place to start, before adapting to your own context.
20
21
- A [recommended-strict](./rules/recommended.md#recommended-strict-ruleset) ruleset is identical to the `recommended`, except it elevates all warnings to errors. It's the ideal option for those who don't want to miss anything.
21
22
- A [minimal](./rules/minimal.md) ruleset is a good starting point for an existing API that doesn't currently conform to any standard. It has fewer rules that cause an error, with others either downgraded to a warning or turned off completely.
Copy file name to clipboardExpand all lines: docs/@v2/rules/built-in-rules.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,10 +29,10 @@ The rules list is split into sections.
29
29
30
30
### Special rules
31
31
32
-
-[no-unresolved-refs](./oas/no-unresolved-refs.md): Every `$ref` must exist
32
+
-[no-unresolved-refs](./common/no-unresolved-refs.md): Every `$ref` must exist
33
33
-[no-unused-components](./oas/no-unused-components.md): All components must be used
34
34
-[security-defined](./oas/security-defined.md): Security rules must be defined, either globally or per-operation
35
-
-[struct](./oas/struct.md): Conform to the declared OpenAPI specification version
35
+
-[struct](./common/struct.md): Conform to the declared OpenAPI specification version
36
36
-[spec-components-invalid-map-name](./oas/spec-components-invalid-map-name.md): Use only alphanumeric and basic punctuation as key names in the components section
37
37
-[spec-strict-refs](./oas/spec-strict-refs.md) Restricts the usage of the `$ref` keyword.
0 commit comments