Skip to content

Commit 012dfdd

Browse files
docs: TOC, reorder oasdiff.yaml section, fix boolean-limitation wording
Three follow-up tweaks to #110: - Add a Contents TOC at the top so readers can jump to the right section in a now-sizeable README. - Move the "Configuring with oasdiff.yaml" subsection from the start of "Free actions" to the end, so readers see the three actions first and discover the shared config option after. - Fix wording in the Limitation note: the previous version said "boolean flags can only be enabled through an action input" but also "passing composed: 'false' has no effect", which is contra- dictory. The new wording — "action inputs can only turn a boolean flag on, not off" — describes what the entrypoint actually does.
1 parent 36d231a commit 012dfdd

1 file changed

Lines changed: 30 additions & 19 deletions

File tree

README.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33

44
GitHub Actions for comparing OpenAPI specs and detecting breaking changes, based on [oasdiff](https://github.com/oasdiff/oasdiff).
55

6+
## Contents
7+
8+
- [Quick start](#quick-start)
9+
- [Free actions](#free-actions)
10+
- [Check for breaking changes](#check-for-breaking-changes)
11+
- [Generate a changelog](#generate-a-changelog)
12+
- [Generate a diff report](#generate-a-diff-report)
13+
- [Configuring with `oasdiff.yaml`](#configuring-with-oasdiffyaml)
14+
- [Spec paths](#spec-paths)
15+
- [Pro: Rich PR comment](#pro-rich-pr-comment)
16+
617
## Quick start
718

819
Add this workflow to `.github/workflows/oasdiff.yaml` to block PRs that introduce breaking API changes.
@@ -34,25 +45,6 @@ This compares your spec on the PR branch against the base branch and fails the w
3445
3546
The following actions run the oasdiff CLI directly in your GitHub runner — no account or token required.
3647
37-
### Configuring with `oasdiff.yaml`
38-
39-
All free actions inherit the CLI's config-file support. Drop an `oasdiff.yaml` at your repo root and the actions pick it up automatically — no extra wiring needed:
40-
41-
```yaml
42-
# oasdiff.yaml at your repo root
43-
exclude-elements:
44-
- endpoints
45-
flatten-allof: true
46-
deprecation-days-stable: 180
47-
fail-on: ERR
48-
```
49-
50-
Any flag the oasdiff CLI supports works in the config file — see [CONFIG-FILES.md](https://github.com/oasdiff/oasdiff/blob/main/docs/CONFIG-FILES.md) for the full reference and supported file formats (`oasdiff.{json,yaml,yml,toml,hcl}`).
51-
52-
Action `inputs:` take precedence over config-file values, so you can use the file for shared defaults across workflows and override per-workflow via inputs.
53-
54-
> **Limitation**: boolean flags can only be enabled through an action input. If your `oasdiff.yaml` sets `composed: true` and you want to disable it for a specific workflow run, edit the YAML — passing `composed: 'false'` in the action input has no effect.
55-
5648
### Check for breaking changes
5749
5850
Detects breaking changes and writes inline GitHub annotations to the Actions summary. Fails the workflow when changes at or above the `fail-on` severity are found.
@@ -164,6 +156,25 @@ jobs:
164156
| `flatten-allof` | `false` | Merge allOf subschemas into a single schema before diff | `true`, `false` |
165157
| `output-to-file` | `''` | Write output to this file path instead of stdout | file path |
166158

159+
### Configuring with `oasdiff.yaml`
160+
161+
All free actions inherit the CLI's config-file support. Drop an `oasdiff.yaml` at your repo root and the actions pick it up automatically — no extra wiring needed:
162+
163+
```yaml
164+
# oasdiff.yaml at your repo root
165+
exclude-elements:
166+
- endpoints
167+
flatten-allof: true
168+
deprecation-days-stable: 180
169+
fail-on: ERR
170+
```
171+
172+
Any flag the oasdiff CLI supports works in the config file — see [CONFIG-FILES.md](https://github.com/oasdiff/oasdiff/blob/main/docs/CONFIG-FILES.md) for the full reference and supported file formats (`oasdiff.{json,yaml,yml,toml,hcl}`).
173+
174+
Action `inputs:` take precedence over config-file values, so you can use the file for shared defaults across workflows and override per-workflow via inputs.
175+
176+
> **Limitation**: action inputs can only turn a boolean flag *on*, not *off*. If your `oasdiff.yaml` sets `composed: true`, passing `composed: 'false'` to the action has no effect — to disable it for a specific workflow run, edit the YAML.
177+
167178
---
168179

169180
## Spec paths

0 commit comments

Comments
 (0)