> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# oasdiff

> How CodeRabbit runs oasdiff to detect breaking changes in OpenAPI and Swagger specifications.

[oasdiff](https://github.com/oasdiff/oasdiff) detects breaking changes between OpenAPI and Swagger specifications. CodeRabbit runs oasdiff version 1.19.1 and reports supported breaking API changes as review comments.

## Files

oasdiff runs on changed OpenAPI and Swagger specification files that match these patterns:

* `**/openapi.yaml`
* `**/openapi.yml`
* `**/openapi.json`
* `**/swagger.yaml`
* `**/swagger.yml`
* `**/swagger.json`
* `**/*.openapi.yaml`
* `**/*.openapi.yml`
* `**/*.openapi.json`
* `**/*.swagger.yaml`
* `**/*.swagger.yml`
* `**/*.swagger.json`

## How it works

When a supported specification file changes, CodeRabbit compares the previous version from the pull request base with the changed version and reports breaking API changes found by oasdiff. Findings are posted as review comments with the affected operation, path, section, and oasdiff fingerprint when available.

oasdiff findings use these severities:

* oasdiff error-level breaking changes are reported as errors.
* oasdiff warning-level breaking changes are reported as warnings.
* Lower-level findings are ignored by default.

## Configuration

oasdiff is enabled by default. You can disable it in `.coderabbit.yaml`:

```yaml .coderabbit.yaml lines theme={null}
reviews:
  tools:
    oasdiff:
      enabled: false
```

oasdiff can also use a repository configuration file. CodeRabbit looks for these files, preferring dotfile names first:

* `.oasdiff.yaml`
* `.oasdiff.yml`
* `.oasdiff.json`
* `.oasdiff.toml`
* `.oasdiff.hcl`
* `oasdiff.yaml`
* `oasdiff.yml`
* `oasdiff.json`
* `oasdiff.toml`
* `oasdiff.hcl`

If no oasdiff config file is present, CodeRabbit generates a profile-based config for the review.

## Profiles

* `Chill`: Reports higher-confidence breaking changes with reduced noise.
* `Assertive`: Reports a broader set of oasdiff warnings and errors.

## When we skip oasdiff

CodeRabbit skips oasdiff when:

* The pull request does not change a supported OpenAPI or Swagger specification file.
* The changed specification file has no previous version in the pull request base.
* oasdiff is already running in GitHub workflows.

## What's next

<CardGroup cols={1}>
  <Card title="Buf" href="/tools/buf" icon="package" horizontal>
    Lint Protobuf files for API consistency and style using Buf.
  </Card>

  <Card title="All supported tools" href="/tools/list" icon="list" horizontal>
    Browse the complete list of linters, security analyzers, and CI/CD integrations available in CodeRabbit.
  </Card>

  <Card title="Configuration reference" href="/reference/configuration" icon="settings" horizontal>
    Full reference for all available options, including how to enable, disable, and tune individual tools.
  </Card>
</CardGroup>
