Repository navigation
Releases
v0.2.3
Highlights
Security fix: upgraded to oasdiff v1.41.0
Every action now runs on oasdiff v1.41.0 (#227), which fixes how allow-external-refs: false is applied when the review upload is on. Both are the defaults of the breaking and changelog actions, so workflows that run them on pull requests from people you do not trust should upgrade. Workflows pinned to @v0 get the fix without a change.
With review: true, one form of $ref to a URL was requested from the runner although external refs were disallowed. A URL is now requested only when it is the spec given in base or revision.
Other changes from oasdiff v1.41.0
- A
notschema added to a request or removed from a response is reported as an error. Some pull requests will show new errors. - The
validateaction reportsconflicting-pathsandduplicate-parameteras errors, so it fails on specs that have either. Both were warnings. exclude-elements: serversleaves server changes out of thediffaction's output.
exclude-elements in breaking, changelog and pr-comment
The exclude-elements input of these three actions is ignored, and setting it prints a warning in the job log (#226). The flag it passed is not one that oasdiff breaking and oasdiff changelog accept, so a workflow that set the input failed. To turn a check off, list its id with level none in a severity levels file and point severity-levels in .oasdiff.yaml at it. The input still works in the diff action.
Full Changelog: v0.2.2...v0.2.3
v0.2.2
Highlights
Upgraded to oasdiff v1.40.0
Every action now runs on oasdiff v1.40.0 (#225), which changes three things in the breaking, changelog and pr-comment actions:
- A change to a parameter declared on a path item is reported on every operation under that path. It reported nothing before.
- Header names are compared ignoring case and shown as they are written in the spec. They were shown in lowercase before.
exclude-elements,exclude-extensions,flatten-paramsandcase-insensitive-headersin.oasdiff.yamlno longer apply to these actions, so setting one no longer removes changes from the report. They still apply to thediffaction. To turn a check off, set its level tononein a severity levels file.
Some pull requests will show different results than with v0.2.1, including new errors where a breaking change was missed.
Full Changelog: v0.2.1...v0.2.2
v0.2.1
Highlights
Each change in the pull-request comment links to its side-by-side diff
Every row of the changes table in the comment now ends with a view link. It opens the review on that change, with the old and new spec side by side, so a reviewer goes from a line in the comment straight to the lines that changed (#223). It applies with and without an oasdiff-token. The check id and its description are on the review page, one click away.
Upgraded to oasdiff v1.39.0
Every action now runs on oasdiff v1.39.0, which corrects how nullability changes are reported:
- A change made through a
oneOforanyOfis decided by what the whole schema accepts. Addingnullto a secondoneOfbranch takesnullaway from the property, and it is now reported asrequest-property-became-not-nullableat error level. - With
flatten-allof,nullable: truebeside anallOfis kept, so removing it is reported. It reported nothing before.
Some pull requests will show different results than with v0.2.0, including new errors where a breaking change was missed.
Fixes
- The Pro review comment no longer shows a review state that can go out of date. With an
oasdiff-token, the comment said "Review required" and kept saying it after the changes were approved, because the comment is only written when the job runs. It now points to theoasdiffstatus check, which is updated when a reviewer approves or rejects (#222).
Full Changelog: v0.2.0...v0.2.1
v0.2.0
The pull-request comment now lists the changes, and oasdiff Pro is the action you already run with a token added. Two behaviors of the changelog action change; see "Upgrading" below.
Highlights
The PR comment lists the changes
The comment the breaking and changelog actions post used to be a link to the review. It now says how many changes there are and lists them, most severe first, each with its check id and endpoint. Five rows stay open and up to fifty more collapse under them, so a reviewer reads what changed without leaving the pull request (#214).
⚠️ 3 breaking changes in this pull request
severity change endpoint error removed the success response with the status 200response-success-status-removedPOST /api/v1.0/groups...
Pro on the breaking action
oasdiff Pro used to need the changelog action. With an oasdiff-token, breaking now uploads an authenticated review of the breaking changes, posts the review comment and sets the oasdiff commit status, so upgrading a workflow built on breaking is one input and one permission (#216):
permissions:
contents: read
pull-requests: write
statuses: write
# ...
- uses: oasdiff/oasdiff-action/[email protected]
with:
base: 'origin/${{ github.base_ref }}:openapi.yaml'
revision: 'HEAD:openapi.yaml'
oasdiff-token: ${{ secrets.OASDIFF_TOKEN }}If the step also sets fail-on: ERR or WARN, keep it. The job fails until every breaking change is approved and passes on the next run after that, so a job that is a required check keeps blocking the merge (#220).
changelog can fail a job, and annotates
changelog takes fail-on, including INFO and MISSING-VERSION-BUMP (#216), and writes inline annotations on the Files changed tab for changes at error and warning level, as breaking does (#217).
config input
breaking and changelog take config, the path to an oasdiff config file, for a repository that does not keep .oasdiff.yaml at its root (#216).
Upgrading
Both of these affect existing changelog workflows:
- A
fail-onin.oasdiff.yamlis now honored bychangelog. The action used to ignore it there while honoringlevelfrom the same file. A workflow whose config file setsfail-oncan start failing where it used to pass. changelogwrites annotations. Pull requests with error or warning changes get inline annotations they did not get before. Outputs and the report are unchanged.
Fixes
- A comment that cannot be posted says what to change. A job without
permissions: pull-requests: writegets a warning naming the permission. A pull request from a fork, where GitHub makes the token read-only, gets a plain line saying the link is in the job summary, since no permission helps there (#214). - The README documents the inputs once.
breakinglists the ten inputs that describe a run,changelogrefers to that list, and the oasdiff flags are pointed at.oasdiff.yaml. It also gains a section on pull requests from forks, and itsseverity-levelsexample no longer names check ids that oasdiff v1.38.0 retired (#218, #219). breakingandchangelognow run from one script. Theiruses:paths, inputs, outputs and defaults are unchanged (#215).
Known issue
With an oasdiff-token, fail-on: MISSING-VERSION-BUMP is not cleared by approving the changes, but while the review is pending the job's notice says it will be. For that value, the way to clear the failure is a major version increase in info.version. A fix follows.
Full Changelog: v0.1.24...v0.2.0
v0.1.24
Every action now runs on oasdiff v1.38.0, which adds a way to gate on version bumps and names the file each change is in.
Highlights
Fail only when a breaking change ships without a major version bump
The breaking action's fail-on input takes a new value, MISSING-VERSION-BUMP:
- uses: oasdiff/oasdiff-action/[email protected]
with:
base: 'main:openapi.yaml'
revision: 'openapi.yaml'
fail-on: MISSING-VERSION-BUMPThe step passes when the breaking changes come with a major increase in info.version, and fails when they do not. Annotations are unaffected, so reviewers see every breaking change on the Files changed tab either way, and the step log says how the version was judged:
versioning policy: violated. info.version is still 1.0.0.
See Version Bumps and Breaking Changes.
This replaces the api-version-not-bumped, api-version-decreased and api-major-version-not-bumped checks, which are retired. If a severity-levels file named in your .oasdiff.yaml lists one of those ids, it now fails to load like any other unknown id, so remove those lines when you upgrade.
Annotations name the file each change is in
- A removal is annotated in the base spec, where the removed element still is, instead of the revision, which no longer has it.
- A change inside a
$ref'd file is annotated in that file instead of in the root document. - A change to
info.versionis annotated on that line.
Fixes
- A description edit inside an anonymous
allOf,anyOforoneOfbranch is no longer reported as a branch added and removed. Editing adescriptionunder aoneOfin a response schema used to produceresponse-property-one-of-addedandresponse-property-one-of-removedfor what was only a documentation change (oasdiff #1404). - A description an inline to
$refrefactor carries is reported again. Inline and$refbranches that validate the same are matched as one branch (on by default), and a matched pair was dropped whole, so a description that differed between the inline branch and the component replacing it was reported nowhere (oasdiff #1408). - The
validateaction no longer fails on a callback cycle, which the other actions already handled (oasdiff #1401).
Full Changelog: v0.1.23...v0.1.24
v0.1.23
Runs on oasdiff v1.37.0
Every action now uses oasdiff v1.37.0 as its base image (#212). No action input or output changed, so a workflow only needs @v0.1.23, or nothing at all if it already points at @v0.
What this picks up for a workflow that checks breaking changes:
- Nine new checks, which can fail a job that passed before. Moving a deprecated resource's sunset date earlier is now reported for endpoints, parameters and properties, deleting a deprecated property's sunset date is reported, and
validateflags a schema that no payload can satisfy. Each one is downgradable with--severity-levels. - Localized output no longer prints
%!(EXTRA ...)in Spanish, Russian and Portuguese, which affected 30 messages. - An unparseable
x-sunsetorx-stability-levelvalue is shown quoted, so an empty value or one padded with a space is visible in the annotation rather than vanishing from it.
The full list is in the oasdiff v1.37.0 release notes, including the change fingerprints that move and what that means for a tool carrying review state.
Full Changelog: v0.1.22...v0.1.23
v0.1.22
Highlights
Upgraded to oasdiff v1.36.0
Every action now runs tufin/oasdiff:v1.36.0 (#211). What a workflow author sees:
- Inline annotations land on the changed line in a JSON spec. Source locations used to need a YAML spec, so a JSON one produced annotations attached to the file with no line or column, and the side-by-side review linked from the PR comment showed no source text at all. Both now behave as they do for YAML. One limit: positions are only as fine as the document's line breaks, so a minified spec with everything on one line puts every annotation on line 1. Run it through
jq .if your specs are generated. - Sunset and deprecation annotations point at the field they are about. Six sunset ids annotated the
deprecatedline rather than thex-sunsetdate they complain about, and a parameter's deprecation finding looked fordeprecatedin the parameter's schema, so it landed on the operation line or carried no line at all. - Adding an
allOfbranch to a request is an error again, onrequest-body-all-of-addedandrequest-property-all-of-added. Both were reported as warnings with a comment suggesting another branch might still keep a constraint that was dropped, which cannot happen: adding a branch only narrows what a request may send. A job that fails on error will now fail on these. - New fingerprints for findings inside an
allOf,anyOforoneOfbranch. The branch name no longer ends in a separator, and the name is part of the fingerprint, so a stored approval for one of these changes is requested once more. validatereturns its findings in the same order every run, sorted by file, line and column, so a step that compares stored reports stops seeing a reshuffle on every push. A spec withcallbackscan also report findings it did not before, andmultiple-of-not-positiveis nowschema-multiple-of-not-positive.- The
diffaction takes--exclude-elements tags, which drops tag changes fromdiffandsummary, both the tags an operation is listed under and the document's own tag definitions.
Also in the image: git revisions work on a repository mounted from the host, so the rev:path syntax no longer fails with "detected dubious ownership" on a self-hosted runner.
Full Changelog: v0.1.21...v0.1.22
v0.1.21
Highlights
Upgraded to oasdiff v1.35.0
Every action now runs tufin/oasdiff:v1.35.0 (#210). What a workflow author sees:
- The
diffaction returns the same output on every run. Parts of the diff were built from map iteration, which Go randomizes, so the order of added, deleted and modified entries moved between runs of the same comparison. A job that diffs the same pair of specs twice now gets identical bytes. - Two new info changes on the
changelogandbreakingactions,api-security-component-oauth-scope-addedandapi-security-component-oauth-scope-changed, because all four OAuth flows are checked now rather than onlyimplicit. A security scheme whoseauthorizationCode,passwordorclientCredentialsflow changed used to report nothing. Each finding names the flow it belongs to. - Removing a deprecated property follows its sunset date. A removed request property or required response property that carries
deprecated: truereportsrequest-property-removed-with-deprecationorresponse-required-property-removed-with-deprecationat info with nox-sunset,*-removed-before-sunsetat error before the date, and nothing after it. Jobs that fail on error may see a removal escalate where the spec sets a future sunset date. - Security scheme URLs are compared by meaning.
https://Login.Example.com:443/tokenandhttps://login.example.com/tokenno longer report a change. - Two crashes are fixed. An
x-extensible-enumholding numbers ([1, 2]) no longer panics when a value is removed, and a callback that references itself no longer overflows the stack.
Also in the image: a refused external $ref exits 123 on every load path, so a step keying off the exit code can offer the allow-external-refs remedy consistently.
Full Changelog: v0.1.20...v0.1.21
v0.1.20
A security release. Every action that uploads a review is affected in its default configuration, so upgrade.
If you pin @v0, as the README recommends, you already have this: the v0 tag now points here, so your next run picks it up with no change on your side. If you pin an exact version, move it to v0.1.20.
Changes
- Base image bumped to oasdiff v1.34.1, which enforces the external-refs policy in the reader that
--openinstalls (#209). Every action that uploads a review runs oasdiff with--open, so without the fix theallow-external-refsinput had no effect on that path: a spec arriving in a pull request could read a file from the runner or reach an arbitrary URL, and the content went into the uploaded review. The input itself was already correct and already defaulted tofalse; only the enforcement one layer down was missing. Affectsbreaking,changelogandpr-comment. Reported by Zachariah Mithani (AploSec). See GHSA-6h8r-wgc5-q3xv.
v0.1.19
oasdiff v1.34.0: security checks and one finding per shared-schema change
Every action now runs oasdiff v1.34.0.
- Security changes are judged by who can call the endpoint. Securing an operation that had no security requirement, directly or through a top-level
securityit inherits, now failsbreaking. Replacing or narrowing the top-levelsecuritylist is reported on each operation that inherits it, at the operation's levels, instead of once at info. Changing how a security scheme sends credentials (its type, an API key's name or location, the HTTP scheme, the OpenID Connect URL) is breaking too. - A change in a shared schema is reported once per check, naming the schema, listing the first three properties it applies to and counting all of them, so large specs produce far fewer annotations.
- More accurate verdicts for removing a whole
enum,dateortimetodate-time, andreadOnly/writeOnlyflips, and faster comparisons of large specs.
When you upgrade, expect some findings to change once: shared-schema findings carry the schema detail in their text, and top-level security findings move to the operations that inherit the list. Review decisions or err-ignore lines tied to the old findings may need updating.
No changes to the actions themselves. oasdiff/oasdiff-action/*@v0 now points at this release.