At Optic we work with a lot of different kinds of diffs. We call a diff between traffic and a spec, a "diff" and a diff between two versions of an OpenAPI document a "changelog"
Optic CI rules take advantage of this pipeline, which, also can support producing changelogs between any two OpenAPI files
- reads your disk / git repo to get the full spec, with all refs resolved
- compute facts about the API specification that are true, independent of formatting, ordering, etc. Notice how if you change the order of Operations in
optic-ci
there's no changelog, even though there's a git diff. This is essential to making a real changelog, that works across a variety of use cases - facts are then compared to produce changes
- Optic CI Rules look for changes they care about and execute to give you results
If you stop at step 3, you have a changelog between the two files.