Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
92f50e5
docs: add diff command design spec
vadyvas Jul 6, 2026
a2caa27
docs: add diff command implementation plan
vadyvas Jul 6, 2026
5c921b7
docs: isolate diff engine in CLI package, mark command experimental
vadyvas Jul 6, 2026
d6e824e
feat(cli): add experimental `diff` command
vadyvas Jul 7, 2026
af8bdfa
docs: add diff command improvements plan
tatomyr Jul 7, 2026
4335855
refactor(cli): simplify diff compat model to breaking/non-breaking
tatomyr Jul 7, 2026
f4fb9da
feat(cli): keep every rule verdict on diff changes
tatomyr Jul 7, 2026
006855e
fix(cli): report diff --fail-on failure visibly and print execution time
tatomyr Jul 7, 2026
5b884c3
refactor(cli): derive diff output format from core OutputFormat
tatomyr Jul 7, 2026
c17cdad
feat(cli): attach file/line/col locations to diff change sides
tatomyr Jul 7, 2026
74012ce
feat(cli): group diff stylish output per operation with locations and…
tatomyr Jul 7, 2026
c19e2bb
feat(cli): match renamed path parameters at the diff compare stage
tatomyr Jul 7, 2026
c76251a
docs: update diff command docs for two-level compat, verdicts, locati…
tatomyr Jul 7, 2026
344d66a
fix(cli): polish diff stylish labels and document callback rename edg…
tatomyr Jul 7, 2026
be8f74d
fix(cli): align diff command with main and refresh e2e snapshots
vadyvas Aug 7, 2026
68f250c
feat(cli): reuse the lint output formats in diff
vadyvas Aug 7, 2026
4114d12
test(cli): add failing e2e tests for the diff rules still missing
vadyvas Aug 7, 2026
68bd9ce
feat(cli): read diff direction from node types and add twelve rules
vadyvas Aug 7, 2026
b29cce2
test(cli): snapshot the stylish report for every diff rule
vadyvas Aug 7, 2026
9b62c60
refactor(cli): clean up the diff command, add AsyncAPI 3 rules
vadyvas Aug 10, 2026
d26de7c
chore: move the diff design notes out of the repository
vadyvas Sep 16, 2026
48992b5
refactor(core): move the diff engine and its formats from the CLI int…
vadyvas Sep 16, 2026
aecb426
refactor(core): index nodes by key with their walker location and com…
vadyvas Sep 16, 2026
39511e1
refactor(core): type diff changes as a discriminated union located by…
vadyvas Sep 16, 2026
b024c95
refactor(core): key paths by shape and path parameters by position in…
vadyvas Sep 16, 2026
98fbe56
refactor(core): judge diff changes through the discriminated union an…
vadyvas Sep 16, 2026
eb368dc
refactor(core): carry locations on diff nodes and type changes as a d…
vadyvas Sep 16, 2026
97a3cd8
refactor(core): give diff rules the visitor factory shape and a repor…
vadyvas Sep 16, 2026
72f5798
refactor(core): write diff rules as visitor factories that report thr…
vadyvas Sep 16, 2026
25e3cb1
feat(core): rate diff changes by semver impact from a configurable ru…
vadyvas Sep 16, 2026
c2600c8
feat(core): add a small semver parse and bump utility
vadyvas Sep 16, 2026
68c51ff
feat(core): show the semver impact of every diff change in the report…
vadyvas Sep 16, 2026
9720f90
feat(diff): rate changes by semver impact, add the --fail-on threshol…
vadyvas Sep 16, 2026
68a21a5
feat(config): configure diff rule impact through a diff block and the…
vadyvas Sep 17, 2026
5f92b41
refactor(diff): tidy labels, comments and the command description aft…
vadyvas Sep 17, 2026
0d17edb
test(core): regenerate the config schema snapshot with the diff block
vadyvas Sep 17, 2026
d691b26
fix(diff): read the schema combinator from the AllOf, AnyOf and OneOf…
vadyvas Sep 17, 2026
b82265c
feat(config): layer diff rule impacts per specification, fall back to…
vadyvas Sep 21, 2026
61aba67
feat(config): take diff rules from plugins, rename the preset to diff…
vadyvas Sep 22, 2026
9b05255
refactor(config): drop the unused-rule bookkeeping from getDiffImpact
vadyvas Sep 22, 2026
b516510
chore: refactor config
vadyvas Sep 22, 2026
54bf943
refactor(diff): compare documents by node pairs and keep the engine s…
vadyvas Sep 23, 2026
5b80ec7
refactor(diff): report an unsupported comparison as a handled error a…
vadyvas Sep 23, 2026
17e3025
refactor(diff): build a diff tree, describe specs as tables, and give…
vadyvas Sep 23, 2026
89d510b
fix(diff): judge $ref list items by their target, resolve percent-enc…
vadyvas Sep 24, 2026
29522f4
refactor(diff): read refs through their target in one place, identify…
vadyvas Sep 24, 2026
9480477
test(diff): unit-test each diff rule on the Cafe API and judge an Ope…
vadyvas Sep 24, 2026
39cb25b
refactor(diff): name what changed in rule messages and stylish headin…
vadyvas Sep 24, 2026
522aa79
test(diff): replace the per-rule e2e fixtures with user stories acros…
vadyvas Sep 24, 2026
e146be0
fix(diff): throw the core error classes now that the CLI error helper…
vadyvas Sep 24, 2026
185629f
fix(diff): judge security, required parameters, bounds, readOnly and …
vadyvas Sep 25, 2026
543fdce
docs(diff): document the diff command, its rules, their configuration…
vadyvas Sep 25, 2026
02fb873
refactor(diff): rework the diff rules by one formula, simplify the no…
vadyvas Oct 7, 2026
fb71005
perf(diff): pair renamed and changed parts with fastest-levenshtein, …
vadyvas Oct 12, 2026
f3d6233
fix(diff): judge a whole enum set or removed as the values it takes a…
vadyvas Oct 12, 2026
d6fd51a
fix(diff): report a property removed from a request whose schema reje…
vadyvas Oct 12, 2026
822594a
chore: update changeset
vadyvas Oct 13, 2026
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
6 changes: 6 additions & 0 deletions .changeset/purple-onions-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@redocly/cli': minor
'@redocly/openapi-core': minor
---

Added an experimental `diff` command that compares two API descriptions, reports what was added, removed, and modified, and rates every change by the semver bump it requires (`patch`, `minor`, or `major`). `--fail-on` sets the impact that fails the run and `--check-version` verifies that `info.version` was bumped accordingly.
162 changes: 162 additions & 0 deletions docs/@v2/commands/diff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# `diff`

## Introduction

The `diff` command compares two API descriptions and lists the changes between them.
The command gives each change an impact: the semver part that a release with this change must bump.

- `major`: the change can break a client, for example a removed operation.
- `minor`: the change adds to the API, for example a new path.
- `patch`: the change does not break or add anything, for example a new description.

Use the command in CI to stop breaking changes, or to get the next version of your API.

{% admonition type="warning" name="Experimental" %}
This is an experimental feature.
Its behavior, options, rule names, and output formats can change in future releases.
{% /admonition %}

## Usage

```bash
redocly diff <base> <revision>
redocly diff <base> <revision> [--fail-on=<impact>] [--check-version]
redocly diff <base> <revision> [--format=<value>] [--output=<path>]
redocly diff <base> <revision> [--config=<path>] [--skip-rule=<rule>]...
```

## Options

| Option | Type | Description |
| --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| base | string | **REQUIRED.** Path, URL, or [alias](../configuration/reference/apis.md) of the older API description. |
| revision | string | **REQUIRED.** Path, URL, or alias of the newer API description. |
| --check-version | boolean | Fail if `info.version` of the revision is lower than the version that the changes require. See [Check the version](#check-the-version). Default value is `false`. |
| --config | string | Specify path to the [configuration file](../configuration/index.md). |
| --fail-on | string | Exit with code `1` if a change has this impact or a higher impact. <br /> **Possible values:** `major`, `minor`, `patch`, `none`. Default value is `major`. |
| --format | string | Format for the output. See [Output formats](#output-formats). <br /> **Possible values:** `stylish`, `json`, `markdown`, `html`, `github-actions`, `next-version`. Default value is `stylish`. |
| --help | boolean | Show help. |
| --lint-config | string | Specify the severity level for the configuration file. <br /> **Possible values:** `warn`, `error`, `off`. Default value is `warn`. |
| --output, -o | string | Write the report to this file. All formats support this option, except `github-actions`. |
| --skip-rule | [string] | Turn off these [diff rules](../rules/diff-rules.md) for this run. |
| --version | boolean | Show version number. |

## How the command compares descriptions

- The [diff rules](../rules/diff-rules.md) find the changes that can break a client and set their impact.
A change that no rule reports is `minor` if you add something, and `patch` in all other cases.
- A new component is `patch`, because it has no effect until something uses it.
- The command follows `$ref`s, also into other files.
It shows a change in a component at the first place that uses the component, with the line of the change in its file.
- If you rename an item, such as a path, a property, or a parameter, and the new item is similar to the old item, the command shows one changed item.

Check warning on line 51 in docs/@v2/commands/diff.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/sentence-length

Sentence is 30 words long; ASD-STE100 recommends at most 20 words in procedures and 25 in descriptive text (max 25).
It does not show a removed item and an added item.
- A new order of list items, such as parameters or `oneOf` subschemas, is not a change.
- The command applies the preprocessors from your configuration, but not the [decorators](../decorators.md).
To compare the descriptions that you publish, bundle them with your decorators first.
- The diff rules support OpenAPI 3.x and AsyncAPI 3.
For other description types, the command lists the changes, but all changes are `minor` or `patch`.
- The command cannot compare descriptions of different types, for example OpenAPI 2.0 and OpenAPI 3.1.

## Output formats

The command prints the report to stdout and all other messages to stderr.

| Format | Output |
| ---------------- | ----------------------------------------------------------------------------------------------------------- |
| `stylish` | The changes grouped by path, webhook, channel, operation, or server, with rule messages and file locations. |
| `json` | All data of each change. Use this format in scripts. |
| `markdown` | A table of the changes for a pull request comment. |
| `html` | A standalone page that you open in a browser. |
| `github-actions` | An error annotation for each rule message of a `major` change. |
| `next-version` | Only the next version, for example `2.0.0`. See [Get the next version](#get-the-next-version). |

## Examples

### Stop breaking changes in CI

By default, the command exits with code `1` if it finds a `major` change:

```bash
redocly diff main/openapi.yaml openapi.yaml
```

To also fail on new features, use `--fail-on=minor`.
To never fail, use `--fail-on=none`.

### Check the version

With `--check-version`, the command also fails if `info.version` of the revision is lower than the version that the changes require:

```bash
redocly diff main/openapi.yaml openapi.yaml --check-version
```

For example, if the base version is `1.2.0` and a change is `major`, the revision version must be `2.0.0` or higher:

```text
❌ info.version went 1.2.0 → 1.3.0, but these changes require a major bump (2.0.0).
```

- Below version `1.0.0`, semver allows a `minor` release to break the API.
Thus, a `major` change from `0.4.2` requires `0.5.0` or higher.
- The command compares only the `major.minor.patch` numbers.
It ignores pre-release and build labels.
- A change to `info.version` does not require a bump.
- If the changes require a bump and `info.version` is not a semver string, the check fails.

### Get the next version

The `next-version` format prints the base version, bumped as the changes require:

```bash
NEXT_VERSION=$(redocly diff main/openapi.yaml openapi.yaml --format=next-version --fail-on=none)
```

If no change requires a bump, the command prints the base version.
Use `--fail-on=none`, so that a `major` change does not stop your script.

### Comment on a pull request

Write the report to a file, and attach the file to a pull request comment:

```bash
redocly diff main/openapi.yaml openapi.yaml --format=markdown -o diff.md
```

To show each breaking change on the changed line, use the `github-actions` format in a GitHub Actions workflow:

```bash
redocly diff main/openapi.yaml openapi.yaml --format=github-actions
```

### Compare two APIs by their aliases

If the `apis` section of `redocly.yaml` has both descriptions, use their aliases:

```yaml
apis:
cafe@v1:
root: v1/openapi.yaml
cafe@v2:
root: v2/openapi.yaml
```

```bash
redocly diff cafe@v1 cafe@v2
```

### Change the impact of a rule

To change the impact of a rule, or to turn it off, add a [`diff` section](../configuration/reference/diff.md) to `redocly.yaml`:

```yaml
extends:
- diff-recommended
diff:
enum-values-added: minor
```

## Resources

- [Diff rules](../rules/diff-rules.md)
- [`diff` configuration](../configuration/reference/diff.md)
1 change: 1 addition & 0 deletions docs/@v2/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Docs linting commands:
CI and delivery commands:

- [`bundle`](bundle.md) Bundle an API description.
- [`diff`](diff.md) Compare two API descriptions and rate each change by the semver bump it requires [experimental feature].
- [`join`](join.md) Join API descriptions [experimental feature].

API testing and drift commands:
Expand Down
13 changes: 13 additions & 0 deletions docs/@v2/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Redocly configuration file

You can configure all of your Redocly tools using a single `redocly.yaml` configuration file in the root of your project. Your `redocly.yaml` configurations can be used locally, in CI, or on our hosted platforms to specify the following behaviors:

Check warning on line 11 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

recheck/semantic-line-breaks

Use semantic line breaks (sentence mode).

Check notice on line 11 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("be used").

- The rules to apply to your APIs and how strictly to `lint`.
- The styles and features to use when rendering your API documentation.
Expand All @@ -20,7 +20,7 @@

## Example Redocly configuration file

An example is worth a thousand words, or so they say. Here's a simple configuration file showing some of the options available and how to use them.

Check warning on line 23 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

recheck/semantic-line-breaks

Use semantic line breaks (sentence mode).

```yaml
extends:
Expand All @@ -43,7 +43,7 @@

Read on to learn more about the various configuration sections and what you can do with each one.

## Using configuration with Redocly CLI

Check warning on line 46 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

recheck/no-gerund-headings

Do not start headings with a gerund.

Some of the Redocly CLI commands, such as the [lint command](../commands/lint.md), use the API names from the `apis` object as shortcuts for referencing API descriptions.
You can tell the `lint` command to validate specific API descriptions by using their names from the `apis` object, like in the following example:
Expand All @@ -52,7 +52,7 @@
redocly lint core@v2
```

On the other hand, if you run the command without specifying any aliases, it applies to all API descriptions listed in the `apis` object of the configuration file.

Check warning on line 55 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/sentence-length

Sentence is 28 words long; ASD-STE100 recommends at most 20 words in procedures and 25 in descriptive text (max 25).

```shell
redocly lint
Expand All @@ -71,7 +71,7 @@
Use `extends` to adopt an existing [ruleset](../rules.md#rulesets) such as the `recommended` or `minimal` standards.
You can also define your own rulesets and refer to them here by file path or URL.

While the order of the sections in the configuration file doesn't matter, usually `extends` is first, and any later rules, preprocessors or decorators defined in this file then override the base settings.

Check warning on line 74 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/sentence-length

Sentence is 32 words long; ASD-STE100 recommends at most 20 words in procedures and 25 in descriptive text (max 25).

Read the [detailed `extends` documentation](./extends.md) to see more information and examples.

Expand All @@ -80,7 +80,7 @@
In the `rules` section, configure which rules apply, their severity levels, and any options that they support.
Configurable rules, and rules from custom plugins are also configured here.

Use this section to adjust the linting rules from the rulesets or other base configuration set in `extends`, and fine-tune it to meet the needs of your API. Here's an example `redocly.yaml`, changing some rule severity, and using some additional configuration for a rule.

Check warning on line 83 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

recheck/semantic-line-breaks

Use semantic line breaks (sentence mode).

Check warning on line 83 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/sentence-length

Sentence is 28 words long; ASD-STE100 recommends at most 20 words in procedures and 25 in descriptive text (max 25).

```yaml
rules:
Expand Down Expand Up @@ -112,6 +112,19 @@
The `lint` command ignores the Recheck presets and the `recheck` block, and the `recheck` command ignores API rulesets.
For more information, visit the [`recheck` block reference](./reference/recheck.md) and the [Markdown and prose linting](../recheck/index.md) section.

### Configure `diff` rules

In the `diff` section, set the impact that each [diff rule](../rules/diff-rules.md) gives to a change: `major`, `minor`, `patch`, or `off`.
The [`diff` command](../commands/diff.md) uses these rules to compare two versions of an API.
See the [`diff` reference](./reference/diff.md) for all options.

```yaml
extends:
- diff-recommended
diff:
enum-values-added: minor
```

<a id="theme-object"></a>

### Configure OpenAPI features and documentation styles
Expand All @@ -122,7 +135,7 @@
In case of conflict, API takes priority.

The API registry supports [the mock server feature](https://redocly.com/docs/api-registry/guides/mock-server-quickstart/) and allows project owners to enable it for all branches per API version.
When the mock server is enabled for an API, you can send test requests to it from any API client.

Check notice on line 138 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("is enabled").

The `mockServer` object allows additional configuration of the mock server behavior.
This object is optional.
Expand All @@ -139,7 +152,7 @@

The `openapi` object configures features and theming for API documentation generated from OpenAPI descriptions.

If you need to apply different theming and functionality to individual APIs, add the `openapi` property to the appropriate API in the `apis` object, and use the same options as the global `openapi` object.

Check warning on line 155 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/sentence-length

Sentence is 34 words long; ASD-STE100 recommends at most 20 words in procedures and 25 in descriptive text (max 25).

Find the full list of supported options on the [Reference docs configuration page](https://redocly.com/docs/api-reference-docs/configuration/functionality/).

Expand All @@ -148,7 +161,7 @@
### Configure each of the `apis` independently

For organizations with multiple APIs, versions or environments, having specific configuration for each is a powerful tool.
All configuration options can be nested within a specific API entry.

Check notice on line 164 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("be nested").

#### Example of `apis` configuration

Expand Down Expand Up @@ -176,7 +189,7 @@

### Use custom `plugins`

Use this list to import any custom plugins (omit this section if you have no plugins). Custom plugins are used to add any custom decorators or rules that you want to use, that aren't provided by the Redocly [built-in rules](../rules/built-in-rules.md), [configurable rules](../rules/configurable-rules.md), or existing [decorators](../decorators.md).

Check notice on line 192 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("are used").

Check warning on line 192 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/sentence-length

Sentence is 29 words long; ASD-STE100 recommends at most 20 words in procedures and 25 in descriptive text (max 25).

Add each plugin by path, relative to the configuration file, to have the plugin contents available to configure.
Importing by URL isn't supported, to reduce the risk of malicious code execution.
Expand Down Expand Up @@ -229,12 +242,12 @@
```

The first match takes priority when a URL matches multiple patterns.
Therefore, only the header from the first match is used in the request.

Check notice on line 245 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("is used").

### Split up the configuration file

As your config file grows, you may want to split it into multiple parts.
Splitting a config file is possible by using references in a config similar to how they are used in OpenAPI descriptions:

Check notice on line 250 in docs/@v2/configuration/index.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("are used").

```yaml
extends:
Expand Down
69 changes: 69 additions & 0 deletions docs/@v2/configuration/reference/diff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# `diff`

## Introduction

The `diff` section sets the impact of each [diff rule](../../rules/diff-rules.md).
The [`diff` command](../../commands/diff.md) uses these impacts.

Use the `diff` section only at the root of a configuration file.
[API-specific sections](./apis.md) do not support it.

{% admonition type="warning" name="Experimental" %}
The `diff` section is an experimental feature.
It can change in future releases.
{% /admonition %}

## Options

{% table %}

- Option
- Type
- Description

---

- {rule name}
- string
- **REQUIRED**. The impact of the changes that the rule reports.
Possible values: `major`, `minor`, `patch`, `off`.

{% /table %}

To set an impact for one specification version, use one of these sections.
They have the same options.

- `oas3_0Diff`
- `oas3_1Diff`
- `oas3_2Diff`
- `async3Diff`

## Examples

This example adds the `diff-recommended` ruleset, sets a lower impact for one rule, and turns off another rule:

```yaml
extends:
- diff-recommended
diff:
enum-values-added: minor
schema-constraint-changed: off
```

This example changes the impact of a rule for OpenAPI 3.1 descriptions only:

```yaml
extends:
- diff-recommended
oas3_1Diff:
schema-type-changed: minor
```

## Related options

- [extends](./extends.md) adds the `diff-recommended` ruleset.

## Resources

- [Diff rules](../../rules/diff-rules.md)
- [`diff` command](../../commands/diff.md)
1 change: 1 addition & 0 deletions docs/@v2/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

# Rules to describe API standards

Redocly uses rules to describe all the different aspects of API behavior that we check for during linting. Rules come in different levels of complexity, and can also be grouped for reuse. Here's an overview of what is available:

Check notice on line 8 in docs/@v2/rules.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("be grouped").

- **Rulesets** are groups of rules that can be applied to any API. This is a good way to build up a ruleset that you can use locally or with your CI. Multiple rulesets can be used at once, so feel free to make smaller ones and compose the rulesets that fit each API.

Check notice on line 10 in docs/@v2/rules.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("be used").

Check notice on line 10 in docs/@v2/rules.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("be applied").
- **Built-in rules:** for the most common use cases, the rules are already made for you, all you need to do is choose if they should cause an `error`, simply `warn` of a problem, or be turned `off`. [See the built-in rules documentation](./rules/built-in-rules.md) for more information and examples.

Check notice on line 11 in docs/@v2/rules.md

View workflow job for this annotation

GitHub Actions / recheck

technical-english/passive-voice

Prefer the active voice; ASD-STE100 recommends it ("be turned").
- **Configurable rules** allow powerful describing of API standards without needing to write code. Create a configurable rule, choose which parts of the API description it applies to, and what the criteria for success are. The linting tool does the rest. With plenty of examples, the [configurable rules](./rules/configurable-rules.md) helps you to describe your API standards easily and well.
- **Custom code rules** if none of the above exactly fits your needs, then a [custom code plugin](./custom-plugins/index.md) is an extensible way to bring some custom JavaScript to build on Redocly's existing features.

Expand All @@ -23,6 +23,7 @@
- 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.
- 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.
- 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.
- The [diff-recommended](./rules/diff-rules.md#diff-recommended-ruleset) ruleset holds the rules that the `diff` command uses to find breaking changes between two versions of an API.

Enable a ruleset by adding a block like this to the Redocly configuration file:

Expand Down
Loading
Loading