The diff section sets the impact of each diff rule. The diff command uses these impacts.
Use the diff section only at the root of a configuration file. API-specific sections do not support it.
Experimental
The diff section is an experimental feature. It can change in future releases.
| Option | Type | Description |
|---|---|---|
| {rule name} | string | REQUIRED. The impact of the changes that the rule reports. Possible values: major, minor, patch, off. |
To set an impact for one specification version, use one of these sections. They have the same options.
oas3_0Diffoas3_1Diffoas3_2Diffasync3Diff
This example adds the diff-recommended ruleset, sets a lower impact for one rule, and turns off another rule:
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:
extends:
- diff-recommended
oas3_1Diff:
schema-type-changed: minor
- extends adds the
diff-recommendedruleset.
- Diff rules - Changes that each rule reports and the impact of the
diff-recommendedruleset diffcommand - Compare two API descriptions and report the impact of each changeapisconfiguration - Define the API aliases that thediffcommand can compare