chore(deps): update dependency tufin/oasdiff to v1.31.0 - #168
Open
Workleap IT (Infra-Workleap) wants to merge 1 commit into
Open
Workleap IT (Infra-Workleap) wants to merge 1 commit into
Workleap IT (Infra-Workleap) wants to merge 1 commit into
Conversation
Contributor
Author
Branch automerge failureThis PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.
|
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
May 23, 2026 06:51 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
May 23, 2026 06:52 — with
GitHub Actions
Failure
| @@ -7,7 +7,7 @@ internal sealed class OasdiffManager : IOasdiffManager | |||
| { | |||
| // If the line below changes, make sure to update the corresponding regex on the renovate.json file | |||
| // Do not upgrade to v2.x as it is an older version with breaking changes | |||
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
June 6, 2026 07:02
c12f219 to
6be38cc
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 6, 2026 07:02 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
June 6, 2026 07:02 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 6, 2026 07:04 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
June 7, 2026 07:21
6be38cc to
8517808
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 7, 2026 07:21 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 7, 2026 07:21 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
June 13, 2026 07:17
8517808 to
7e4cafc
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 13, 2026 07:17 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
June 13, 2026 07:17 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 13, 2026 07:18 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
June 20, 2026 07:26
7e4cafc to
a5f08e8
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 20, 2026 07:26 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
June 20, 2026 07:26 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
June 20, 2026 07:30 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
June 27, 2026 07:03
a5f08e8 to
911edba
Compare
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
July 11, 2026 06:46 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
July 11, 2026 06:48 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
July 18, 2026 06:42
a89c1be to
c64c555
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
July 18, 2026 06:42 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
July 18, 2026 06:42 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
July 18, 2026 06:45 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
August 1, 2026 06:49
c64c555 to
59b82c5
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 1, 2026 06:49 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
temporarily deployed
to
ci
August 1, 2026 06:49 — with
GitHub Actions
Inactive
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 1, 2026 06:51 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
August 8, 2026 06:14
59b82c5 to
a3539d4
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 8, 2026 06:14 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 8, 2026 06:16 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
August 15, 2026 06:07
a3539d4 to
fbf70d9
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 15, 2026 06:07 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 15, 2026 06:09 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
August 29, 2026 06:20
fbf70d9 to
54bc60e
Compare
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 29, 2026 06:20 — with
GitHub Actions
Error
Workleap IT (Infra-Workleap)
had a problem deploying
to
ci
August 29, 2026 06:37 — with
GitHub Actions
Failure
Workleap IT (Infra-Workleap)
force-pushed
the
renovate/tufin-oasdiff-1.x
branch
from
September 12, 2026 06:07
54bc60e to
21c43b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.12.4→1.31.0Release Notes
Tufin/oasdiff (Tufin/oasdiff)
v1.31.0Compare Source
Complete set/unset coverage, and read-only properties reported right
Every ordered constraint keyword (
maximum,minimum,multipleOf,maxLength,minLength,maxItems,minItems,maxProperties,minProperties,minContains,maxContains) now has set and unset checks on both sides of the wire, at body, property, parameter, and response-header level: 106 new checks, taking the catalog from 575 to 681, each with its severity derived from the same reviewed model introduced in v1.30.0. And changes to read-only request properties are no longer false breaking errors: oasdiff now knows areadOnlyproperty never appears in a request, reports such changes at info with a comment saying why, and applies the mirror rule towriteOnlyproperties in responses.CLI changes
Changes that now fail
oasdiff breakingmaximum: 100from a response property means the server may now return values no old client had to handle, the same widening that removingmaxLengthalready reported. Every keyword now has the unset check, on response bodies, properties, and headers. If a specific case is intended, lower the check with--severity-levels.multipleOf,minLength,maxItems,maxProperties,minProperties,minContains, andmaxContainsset on a parameter previously reported nothing (or misreported, see below); setting a bound rejects values the previous contract accepted, so they now match the existingmax-setfamily, with the same explanatory comment.Changes that no longer fail
readOnlyproperty never appears in a request, so adding apattern, setting amaximum, changing its type, or any other request-side restriction cannot invalidate one. Forty-one checks previously reported these as errors; they now report info with the comment "The property is read-only, so it never appears in requests and this change cannot invalidate one." The mirror applies towriteOnlyproperties in responses. An explicit--severity-levelsentry for a check keeps whatever level you set. The breaking changes documentation describes both this rule and the existing allOf case.Misreport fixes
minLengthandminPropertieson bodies and properties, andminLengthandminItemson parameters, going from absent to a value reported as "increased from 0" and removing the bound as "decreased to 0". These now report as set and unset, the same fixminItemsreceived in v1.30.New checks not listed above
oasdiff checks changelogand in the coverage listing.Go package changes
rules.DeriveLevel(effect, direction, guards...)is the severity law as a function, andRule.DerivedLevel()applies it to a rule's own metadata. Every rule's registered level equals its derived level, enforced in CI.diff.SchemaBoundslists the ordered constraint keywords (#1215, #1219). Each entry names the keyword, where its diff lives, and how that diff encodes absence (nil for pointer-backed fields, 0 for the plain-uint64 lower bounds), withWasSetandWasUnsetclassification methods. The checker's generated rules and any library caller share one definition of "this bound appeared or disappeared".checker.GetAllRulesincludes generated rules (#1215). The set/unset rules are generated from a keyword table rather than written by hand; they carry ids, levels, and locations like any other rule, so callers that enumerate rules see them transparently.v1.30.0Compare Source
Provable check coverage, derived severities, boolean schemas, positional prefixItems
The largest change to breaking-change detection since the checker was introduced: every check's severity is now derived from a single reviewed model of what each change does to the API contract, enforced in CI, with zero recorded exceptions. That audit produced 58 new checks and corrected the severity of 36 existing ones, so some changes that previously passed
oasdiff breakingwith a warning now fail it, and some that failed now pass. Teams that disagree with any individual verdict can override it with--severity-levels. The release also brings OpenAPI 3.1 boolean schemas (items: falsetuples), positionalprefixItemscomparison, OpenAPI 3.2 QUERY and custom methods, and a newbreaking-filescommand for pre-commit hooks.CLI changes
Severity corrections: changes that now fail
oasdiff breakingrequest-*-{max,max-length,min,min-items,exclusive-max,exclusive-min}-setchecks: adding a bound rejects values the previous contract accepted, the same shape asbecame-enum,const-addedandpattern-added, which were already errors. If your clients are known to stay within the new limit, lower the check with--severity-levels.api-security-removed,api-global-security-removed,api-security-scope-added,api-global-security-scope-added: requirements are alternatives, so removing one strands clients authenticating with it, and scopes are conjunctive, so adding one rejects tokens that lack it.response-body-any-of-addedandresponse-property-any-of-addednow matchresponse-body-one-of-added, andresponse-property-enum-value-addedis an error: the server may return a value no client was written to handle (usex-extensible-enumfor value sets that are meant to grow).response-property-pattern-removedis an error andresponse-property-pattern-changeda warning for the same reason.Severity corrections: changes that no longer fail
request-parameter-default-value-{added,changed,removed}drop from error to info, matching the body and property default checks: a default is a server-side fallback and does not change which requests are valid.response-optional-property-removedandoptional-response-header-removed: a conforming client already tolerates the element's absence.request-body-all-of-removed,request-property-all-of-removedandresponse-required-property-became-not-write-onlydrop to info on similar reasoning, andresponse-media-type-name-changedbecomes a warning with a comment naming what cannot be determined.oneOfthat keeps the original schema as one of the alternatives is now the newrequest-body-wrapped-in-one-of-original-preserved/response-body-wrapped-in-one-of-original-preservedat warning level, with a comment explaining the residual risk; a wrapping where no alternative accepts what the original did keeps the error.New checks
maxItems,maxProperties,minProperties,multipleOfanduniqueItemswere not checked at all; they now are, across request body, property and parameter and the response side, in both directions, including read-only variants and themultipleOfgeneralized/specialized cases where one bound divides the other. ThemultipleOfcomparison is exact rational arithmetic, so0.3to0.1is a generalization and a ratio merely close to an integer is not (#1205).Boolean schemas (OpenAPI 3.1)
trueandfalseschemas load and diff (#1184, #1191). A schema written as a JSON Schema boolean failed to parse before; it now loads, and the diff models it. A schema becomingfalseaccepts nothing: the new*-schema-became-falsechecks report it as an error on the request side and for a response body (the client's media type can no longer be inhabited), across body, property, parameter, parameter property and response header. The reverse transitions report as*-schema-became-not-false. A change between{}andtrueis a document edit with no contract effect: visible inoasdiff diff, silent in the changelog.items: falseis detected (#1203). Addingitems: falseto a schema that had noitemsinvalidates every array longer than the prefix and previously reported nothing.falseortrueis classified, not just counted (#1191). A media-type schema added asfalsereports asschema-became-falseinstead of an informational "schema added", and one added astrueor{}(which accepts exactly what the absent schema accepted) reports nothing instead of a spurious error on the request side.prefixItems is positional
prefixItemsentries were matched as an unordered set, so swapping[string, integer]to[integer, string]reported no change when every position now validates against a different schema. Entries are now paired by index, so a reorder or in-place edit reports as a located type change (prefixItems[subschema #​1]), andoasdiff diffshows per-position modifications.itemsschema it displaces changes nothing and now reports nothing; otherwise the eight added/removed checks report a warning with a comment explaining why the direction cannot be determined: an added entry constrains an open position whenitemsis absent but lengthens the tuple whenitemsisfalse, so the old fixed verdicts (info one way, error the other) asserted a direction the spec does not fix.OpenAPI 3.2
queryfield andadditionalOperationsmap were invisible to the diff (parked in extensions, then skipped by the fixed method list); they are now diffed like any other operation.additional-operations-*,query-field-for-3-2-plus,boolean-schema-for-3-1-plusandboolean-schema-with-other-keywordsjoinoasdiff validate.New commands
oasdiff breaking-fileschecks each changed spec against a git ref (#1183, thanks @ChrisJr404): one comparison per spec against the same path in the ref, an aggregated exit code, and a skip with a fetch hint for specs not in the base. Designed for pre-commit hooks; an example.pre-commit-config.yamlships inexamples/.oasdiff checks changelog coverageshows what the checker covers (#1174). Every possible edit to an OpenAPI document, derived mechanically from the object model (5,564 locations, 15,255 edits), with the checks that cover it or the reason it is waived.--tagsfilters by direction, area, kind, action and status;--patternslists the claim patterns. Uncovered edits and stale waivers fail the build, so the coverage listing is enforced, not aspirational.Misc
oasdiff validatefindings always carry a line and column (#1177).duplicate-required-fieldandduplicate-tagreported a file with no location.--templateformat is rejected before the specs load (#1178), like the equivalent--colormismatch, instead of after the full diff run.Go package changes
checker/rules(#1174). Every rule declares itsDirection,Area,Kind,Effect(widens, narrows, incomparable, unknown, none, violation) andGuards, andchecker.BackwardCompatibilityRulecarries them. Severity is derived from that metadata by a law enforced in tests: narrowing a request or widening a response is an error, the reverse is info, undecidable is a warning.checker/metaschema(the edit-space model) andchecker/coverage(the audit) are new packages.diffunderstands boolean schemas (#1191).SchemaDiff.AlwaysDiffcarries transitions of the JSON Schema boolean form, andSchemaRefsValidationEquivalenttreatstrueas the empty schema while keepingfalsedistinct.diffpairsprefixItemsby index (#1192).SchemaDiff.PrefixItemsDiffreports positional modifications instead of set-matched additions and deletions; consumers of the diff JSON seemodifiedentries where reorders previously produced nothing.PrefixItemsValidationEquivalentreports whether two schemas validate every prefix-covered position identically (#1200), andOneOfWrappingDiff.OriginalPreservedreports whether a oneOf wrapping keeps the base schema as an alternative (#1174).colorizepackage (#1174).checkerkeeps type and constant aliases, so existing callers compile unchanged.checker/generatorpackage is removed (#1174).Misc
toolchaindirective picks up standard-library security fixes (crypto/tls, net/url, html/template, encoding/asn1) for release binaries,go installbuilds and local builds alike;golang.org/x/textmoves past CVE-2026-56852.v1.29.1Compare Source
--flatten-allofnow flattens what your diff actually readsA single-fix release: schemas reached through a
$ref(the most common shape in real specs) were escaping allOf flattening entirely, so--flatten-allofoften had no effect. Anyone using the flag withoasdiff breakingorchangelog(via the CLI, GitHub Action, or Docker image) will see the flag start doing its job on these specs, with sharper verdicts and cleaner property paths.CLI changes
--flatten-allof$refis a separate reference sharing the definition's schema value, and the merger previously repointed only the definition's reference, leaving every use of the schema (for exampleschema: { $ref: '#/components/schemas/Pet' }under a response) reading the unmerged original. Since the diff traverses schemas through their uses, anallOfreached under a$refsurvived--flatten-allofcompletely, andoasdiff breaking --flatten-allofcould produce output identical to running without the flag. The merged content is now written into the schema every$refalready points at, so flattening takes effect at the point of use. Serialized output ofoasdiff flattenwas already correct and is unchanged.allOf[...]prefix (the branch is no longer part of the path), verdicts sharpen where a siblingallOfbranch previously hid a change, and changes under such anallOfstop carrying the unmerged-allOf disclaimer, which had been advising users to pass a flag they had already passed. All three are the intended behaviour of the flag, now applied consistently.v1.29.0Compare Source
OpenAPI 3.2 streamed bodies, honest verdicts under unflattened allOf, sharper severities
oasdiff now checks the contract of streamed bodies (SSE, JSON Lines) via OpenAPI 3.2's
itemSchema, tells you when a verdict rests on anallOfit could not compare exactly (and caps it at warning), reports a removed response schema as the error it always was, and stops the allOf flattener from dropping sixteen OpenAPI 3.1 keywords.CLI changes
OpenAPI 3.2 streamed bodies (
itemSchema)itemSchematyping each item of a streamed body (an SSE event, a JSON Lines record); oasdiff previously ignored it, so a breaking change to a streamed item's contract came back clean. All existing body checks now run against the item schema as well as the body schema, with an(item schema)marker on the message so you can tell which one changed. Five new change IDs cover an item schema appearing or disappearing:request-body-media-type-item-schema-added,response-body-media-type-item-schema-removed, andresponse-body-media-type-item-schema-removed-untypedare errors; the reverse directions are info.docs/OPENAPI-31.mdgained a 3.2 section.request body enum value removed 'b' (media type: application/json), instead of printing two indistinguishable lines.Disclaimers: saying what the comparison could not see (#1147)
allOfare capped at warning, with an explanation. Without--flatten-allof, oasdiff comparesallOfbranches one by one, so it cannot tell whether a sibling branch still provides what one branch dropped. Such verdicts previously came out as flat errors that could vanish (or appear) when the flag was added. They are now reported at most as warnings, with an appended note naming the uncertainty and the flag that resolves it, and adisclaimersarray (["all-of-not-flattened"]) in json and yaml output. A level you set explicitly via--severity-levelsstill wins over the cap.request-body-all-of-addednow reports warning instead of error as a consequence: on its own fixture,--flatten-allofreports nothing, so the unconditional error was a false positive.Severity correction
response-body-media-type-schema-removedwas a warning while both the change that contains it (removing the media type) and the change it contains (removing one required property) were errors. A media type with no schema places no constraint on the body at all, so every guarantee the consumer had is gone.oasdiff breakingreports the same set of changes as before, but pipelines gating on--fail-on ERRthat tolerated this will now fail, which is the point of the change.Flatten
unevaluatedProperties,if/then/else,dependentSchemas, and thirteen more JSON Schema 2020-12 keywords on the outer schema were silently lost from every merge, including a schema with noallOfat all, so a closed schema became open and whole validation branches disappeared from--flatten-allofcomparisons. They now pass through, andoasdiff diffbetween a spec and its flattened output no longer reports the loss. A keyword on anallOfsubschema is still not merged;docs/ALLOF.mddocuments that remaining limitation.Misc
oasdiff-cli/<version>(plus the CI platform when one is declared, e.g.github-actions) instead of an unversionedoasdiff-cli. Nothing identifying is added; this names the client, not the user.Go package changes
Disclaimers surface
checker.Changeinterface gainedGetDisclaimers() []Disclaimer(#1147). Any external implementation ofChangemust add the method (returning nil is fine;ComponentChangeandSecurityChangedo exactly that).ApiChangecarries a newDisclaimersfield and aWithDisclaimersmethod, which is additive and de-duplicating, and the newchecker.Disclaimertype serializes by name (all-of-not-flattened) in json and yaml.Misc
diff.MediaTypeDiff.ItemSchemaDifffield (#1139). A*SchemaDifffor the OpenAPI 3.2itemSchema, serialized asitemSchemain diff output, alongside the existingSchemaDifffor the whole-body schema.v1.28.0Compare Source
Lower memory through a diff
A single dependency bump, to kin-openapi v0.146.0, which cuts the memory a diff holds for its whole run by about a third on large specs. No CLI or behaviour changes.
CLI changes
Memory
A diff holds roughly a third less memory (#1134). oasdiff loads both specs with source origins enabled, and both documents stay resident for the length of the operation, so the memory the origins occupy is a floor on the whole run rather than a spike during load. Two changes in kin-openapi v0.146.0 lower that floor:
Origin.Fieldsbecame a slice, and a document's origin tree is now retained only when a$refcan actually reach into it untyped.Measured by loading two APIs.guru specs (11.4 MB and 10.3 MB) with origins on and reading the heap after a forced GC:
Peak RSS is not meaningfully different. The saving is in what stays held, which is what matters to a long-running service holding parsed specs and to a memory-capped container, rather than to the high-water mark of a short CLI run.
Go package changes
Breaking:
Origin.Fieldsis a sliceopenapi3.Origin.Fieldsis nowFieldLocations, notmap[string]Location(#1134). This comes from kin-openapi v0.146.0 and reaches you through oasdiff's dependency on it. A Go caller that reads a field location by name changes from an index to a lookup:Lookupreturns the same(Location, bool)pair, so the surrounding code is unchanged. Ranging overFieldsand taking its length still work. EachLocationcarries its ownName, which is what the lookup matches on.JSON and YAML output are unaffected:
FieldLocationsmarshals as the same name-keyed object the map produced, so anything consumingoasdiff diff -f jsonsees no difference.v1.27.0Compare Source
This release adds a versioning policy, more
validatelints, and reorganizesoasdiff checksinto one listing per rule set.CLI changes
Versioning policy
info.versionon each side against the severity of the changes it found, and reports a breaking change that shipped without a major version increase. There are three ids, one per way to violate the policy:api-version-not-bumped(the version is unchanged),api-version-decreased(it moved backwards), andapi-major-version-not-bumped(it moved, but not the major). All default to INFO, so nothing fails on their own; raise them toerrwith--severity-levelsto enforce, or set them tononeto switch them off (#1133, closing #1007, from a request by @rethab in oasdiff-action#154). Nothing is reported unless a breaking change is present and both versions parse as semver, so specs versioned by date, by a barev1, or not at all are left alone. Below1.0.0a minor bump satisfies the policy, since semver gives the minor the major's role there. See VERSIONING.md.oasdiff checksnow names its rule setoasdiff checkson its own prints the available listings instead of the changelog rules. There is now one listing per rule set:oasdiff checks changelogfor the rulesbreakingandchangelogapply, andoasdiff checks validatefor the rulesvalidatereports (#1132). If you scriptoasdiff checks, add thechangelogsubcommand. The validate rules had no listing at all before this.New
validatelintsminimumabovemaximum, and the same forminLength/maxLength,minItems/maxItems,minProperties/maxPropertiesandminContains/maxContains(#1122).type-format-mismatch: aformatthat belongs to a different type is reported as a warning, since it is silently ignored at runtime, for exampleformat: date-timeon an integer (#1120).Severity and flag changes
request-body-enum-value-removedis now breaking by default. Removing an enum value from a request body rejects payloads that were valid before, which is an error, not an informational note (#1118).--include-checksis deprecated and ignored, and the optional-checks mechanism behind it is retired. All checks now run, and severity is the only lever. If you used--include-checksto make an optional check fail the build, it no longer does: the check now reports at its default severity, so move those ids into--severity-levelswitherrto keep the gate. The flag still parses and prints a notice on stderr.--flattenand--max-circular-depare likewise deprecated, each pointing at its replacement (#1119).Misc
Go package changes
diff.DiffcarriesBaseInfoandRevisionInfo(*openapi3.Info), the info object from each spec, following the sameBase/Revisionconvention asPathsDiffandSchemaDiff. They are populated only on a non-empty diff and excluded from JSON and YAML output, soEmpty()and the diff output are unchanged (#1133).checker.InfoChange, for findings whose subject is the document rather than an endpoint. It implementschecker.ChangelikeApiChange,ComponentChangeandSecurityChange, with an empty path and operation andGetSection() == "info". Code that type-switches over change types should expect it (#1133).GetOptionalChecks,GetOptionalRulesand theWithOptionalChecksoption no longer exist, andGetAllChecksreturns every check. Callers that enabled optional checks should set the severity of the ids they care about instead (#1119).v1.26.1Compare Source
Security patch release. Cut directly off v1.26.0 so it contains this fix and nothing else.
CLI changes
Security: a git revision could be parsed by git as an option (GHSA-m3wq-w7x2-4q6m)
Git revisions are no longer parsed as git options. oasdiff passed git revisions to
gitas operands without an end-of-options separator, so a revision beginning with-was parsed by git as an option rather than a revision.git show --output=<path>writes git's output to that path, an arbitrary file overwrite running as the invoking user, andgit fetch --upload-pack=<program>makes git execute that program (reachable through the opt-in--fetchflag).Running
oasdiffdirectly from a shell was not the exposed path: the CLI's own flag parser rejects a leading-dash positional. The issue was reachable after a--separator, and, more importantly, through the Go library API, which an embedding program can call with a revision from an untrusted source, and through wrappers that pass a revision through from input or configuration.Fixed in two layers: every git invocation now passes
--end-of-options, so git treats what follows as an operand, and a revision beginning with-is rejected before git is invoked. The second layer does not depend on the git version (--end-of-optionslanded in git 2.24) and produces a clear error instead of a confusing one from git. No legitimate git revision begins with-, so nothing valid is refused.Who should upgrade: anyone calling the
loadpackage (or any oasdiff API that loads from a git revision) with a revision that is not a hardcoded literal, and anyone wrapping the CLI in a script that interpolates untrusted input into a revision argument.Users of the oasdiff GitHub Action get this in oasdiff-action v0.1.10. If you pin the action at
@v0you already have it.Go package changes
load.ErrRefLooksLikeOption, returned for a git revision beginning with-.v1.26.0Compare Source
Response header schema checks (#1116)
oasdiff now inspects a response header's schema, not just whether the header exists. Six new checks report type, format, and nullability changes on response headers, closing a gap where a change like
Retry-Aftergoing fromstring/date-timetointegerwas silent in bothbreakingandchangelog:response-header-type-changed,response-header-type-generalized(breaking)response-header-type-specialized,response-header-type-compatible(info)response-header-became-nullable(breaking),response-header-became-not-nullable(info)A header value is text on the wire, so a response header is classified the same way a scalar parameter is: a bare
stringtointegerswap is backward compatible (the value is still valid text), while dropping a parsed format (date-timetointeger) or widening the returned type is breaking.Note: because these are new detections, a spec with response-header type, format, or nullability changes will now surface findings that earlier versions did not, including new breaking-change errors from
oasdiff breaking. Use--severity-levelsto adjust any check that does not fit your API.Thanks to @nrutman for reporting this against a real API change (a response
Retry-Afterheader going fromstring/date-timetointeger) in #1094.validate: required with a default (#1111)
oasdiff validatenow flags a parameter or property that is bothrequiredand carries adefault. A default only applies when a value is omitted, so it can never take effect for a value the client is required to send. The two together are usually a mistake.Encrypted review bundle records its origin (#1113)
A
--openreview bundle now carries the oasdiff version and platform that produced it, so the review page can tell when a review was created by an outdated client.Docs and dependencies
v1.25.1Compare Source
A required request property with a default is now a breaking change (error)
new-required-request-property-with-defaultandrequest-property-became-required-with-defaultare now reported as error (breaking). In v1.25.0 they were briefly reported aswarning, and before that asinfo.Breaking-ness is a property of the contract your OpenAPI definition declares, not of how a lenient server behaves. A request that omits a
requiredproperty is invalid under the new contract, whether or not the property has adefault. The default is a server-side fallback value; it does not make the omitted property valid. Whether a particular server applies the default and accepts the request anyway is that operator's choice, and other consumers of the same contract (generated client SDKs that make the property a mandatory argument, and strict API gateways that reject the missing field) break regardless.Each change carries a comment explaining why the default does not make it safe. If the change is safe for your specific ecosystem, downgrade exactly these checks with a severity-levels file, for example a line reading
new-required-request-property-with-default info, passed via--severity-levels.A new section, "How oasdiff decides what is breaking," has been added to the breaking-changes documentation.
Full Changelog: oasdiff/oasdiff@v1.25.0...v1.25.1
v1.25.0Compare Source
Superseded by v1.25.1. This release briefly reported required-request-property-with-default as a warning; v1.25.1 corrects it to error. Use v1.25.1 or later.
v1.24.0Compare Source
Richer
validate, per-endpoint review blocks, kin-openapi v0.143.0Two new
validatelints (duplicate enum values, ambiguous parameter serialization), validation rule IDs now sourced from kin-openapi's stable codes, per-endpoint block extraction so the--openreview scales to large specs, and correct source locations for$refs into arbitrary top-level keys. Built on kin-openapi v0.143.0.CLI changes
validateoasdiff validatenow warns (duplicate-enum-value) when anenumlists the same value more than once. JSON Schema says enum values SHOULD be unique and kin-openapi does not reject them, so this is an oasdiff-native SHOULD-level check. It visits every schema in the document viaWalkSchemas, so components, paths, webhooks, and all sub-schema keywords are covered, and the finding points at the exact JSON Pointer.ambiguous-parameter-serialization) when a parameter's schematypeunion mixes a structured type (array/object) with a scalar, e.g.type: [array, integer]. Style serialization is defined per type, so a server cannot tell whether?token=5is the array["5"]or the integer5.nullis excluded from the check (it carries no serialization of its own) and two scalars are fine.validateemits are the stable codes kin-openapi declares on each validation error, gated against a fixed registry so the public ID surface cannot drift silently on a dependency bump. Spellings are unchanged, with one refinement: two errors that previously reported the genericspec-validation-errornow report their specific codes,duplicate-required-fieldandduplicate-tag.--openreview$ref, including a$refto a schema under an arbitrary top-level key, is sliced from the file it actually lives in.Fixes
$refs into arbitrary top-level keys (via kin-openapi v0.143.0). A$refto a schema stored under a non-componentstop-level key (./schemas.yaml#/User, the Swagger-2-era "definitions bag") used to lose its origin, so a change to it was reported at the referencing operation. It now reports the schema's own file and line, in-f jsonsources and in the review.Go package changes
openapi3.StringMap[V]type (an internal helper, now justmap[string]V), addsT.WalkParameters, preserves origins for$refs into arbitrary top-level keys, and declares stable codes on validation errors (openapi3.CodedError,openapi3.ValidationErrorCodes()). If your Go code referencedopenapi3.StringMap, switch tomap[string]V.errors.Asdispatch is converted to Go 1.26errors.AsType, and theflattenpackage now walks schemas viaopenapi3.WalkSchemasinstead of a hand-rolled traversal.Plus routine dependency bumps (#1099, #1104).
v1.23.0Compare Source
Nullability changes recognized in every form, at every level
OpenAPI has three equivalent ways to make a schema nullable: the
nullablekeyword (3.0), a"null"entry in the type array (3.1), and wrapping the schema inoneOf: [{type: "null"}, X], the common idiom for$ref'd schemas. oasdiff now recognizes all three as one thing and reports a singlebecame-nullableorbecame-not-nullablefinding, in both directions, for bodies, properties, parameters, and parameter properties. The new nullability guide explains the model, when a nullability change is breaking, and the deliberate limits.CLI changes
oneOf: [{type: "null"}, X]is one INFO finding, not false breaking errors (#1089, fixes #1088, thanks @katepol for the report). The wrap moves the schema one level down, so the enum used to read as removed (two falserequest-property-enum-value-removederrors per wrapped enum), pluspattern-removed,one-of-added, andtype-generalizednoise. oasdiff now proves the wrapped branch is equivalent to the original and reports onebecame-nullable. The recognition declines conservatively when the edit is more than a pure wrap: an already-nullable schema, a branch that also changed (the constraint reports remain), or a null branch added to a multi-branchoneOf.became-not-nullablefinding (#1092, fixes #1091). The reverse edit used to report echoes, including a falserequest-property-became-enumand a falsenew-required-request-property. On the request side this is an error (the request no longer accepts null); on the response side it is informational, via the newresponse-body-became-not-nullableandresponse-property-became-not-nullableverdicts, which also cover the keyword and type-array forms that previously reported nothing at all on responses.type: [string, "null"]andtype: stringwas silent in both directions, although the removal direction is breaking. New verdicts:request-parameter-became-nullable(info),request-parameter-became-not-nullable(error), and therequest-parameter-property-*pair for properties of object parameters. Response headers are not covered yet (#1094).became-(not-)nullablefamilies), localized in all four locales.Go package changes
Formatter.RenderChangelogno longer takes version strings (#1085). Only the HTML and markup formatters render the base and revision versions, so the versions moved into those formatters' options and off the shared interface; the other six formatters no longer carry dead parameters.ComputeFingerprintmoved fromformatterstochecker(#1086). It computes a change's stable identity fromchecker.Changefields and has no formatting logic; callers that only need a fingerprint no longer depend on the output-rendering package. Call sites change fromformatters.ComputeFingerprinttochecker.ComputeFingerprint; output is byte-identical.ApiChange.WithSchemaand the schema transitions table (#1089, #1092). Checkers no longer carry suppression code: a change built withWithSchema(node)is dropped automatically when a recognized schema transition at that node explains it (checker/transition_claims.gopairs each recognition with the finding kinds it claims and the rules that report it).diff.SchemaDiffgainsNullableWrappingDiff.Changelog
48c3e04docs: note the response-header limitation in NULLABILITY.md (#1094) (#1095)b3a5250feat(checker): nullability checks for parameters (#1017) (#1093)3433af9fix: report nullability removal as became-not-nullable (#1091) (#1092)1e3edfffix(diff): recognize the nullable oneOf wrapping (#1088) (#1089)a5118c9chore: apply gopls modernize suggestions (#1087)7663150checker: move ComputeFingerprint out of formatters (#1086)1bb851fformatters: carry changelog versions only in HTML and Markup (#1085)v1.22.0Compare Source
Exact source locations, an OpenAPI 3.1 allOf fix, and a published output schema
Every change reported by
breakingandchangelognow carries a precise source location, down to the exact field or value that changed. OpenAPI 3.1 multi-type arrays no longer fail--flatten-allof, and a newoasdiff schemacommand publishes a JSON Schema for the machine-readable output so CI tooling can validate against it.CLI changes
--flatten-allof(#1079). Any multi-type array such astype: [integer, "null"](the idiomatic 3.1 way to express nullable) inside a schema touched by allOf merging used to fail withunable to resolve Type conflict: all Type values must be identical, even when there was no conflict at all. The merge now keeps each schema's type array intact and intersects across allOf branches: a multi-type array in a single branch passes through unchanged, identical arrays across branches merge, andintegerstill resolves as a subset ofnumber. A genuinely empty intersection (e.g.[string, "null"]with[integer]) reports the same conflict error as before. Fixes #1078 (thanks @katepol for the report) and #535.oasdiff schemacommand (#1075, thanks @fuleinist for the request in #1074). Prints a JSON Schema describing the--format json/yamloutput ofbreakingandchangelog, reflected directly from the output type so it cannot drift. Non-Go CI tooling can pin the schema to an oasdiff version to validate or type results. ThediffJSON is intentionally not covered yet, since itsfrom/tovalues are too loosely typed for a useful reflected schema.Exact source locations
api-global-security-*,api-security-*,api-security-component-oauth-*) previously appeared with nobaseSource/revisionSource. They now anchor to the relevantsecurityfield or scheme. Known limitation: the two scope-added cases point at their container rather than the exact scope line, pending an upstream parser origin enhancement.api-stability-*,api-invalid-stability-level, and property stability changes anchor to the exactx-stability-levelfield, andrequest-parameter-sunset-parseis located consistently from both checks that emit it. With this, every checker emits a location.x-extensible-enumchanges point at the exact field or value (#1073).api-sunset-*andrequest-parameter-sunset-*now point at thex-sunsetfield instead of the containing operation or parameter, and thex-extensible-enum-value-removedchecks point at the exact removed value, matching how theenumchecks already behave.tags:field (#1076).api-tag-removed/api-tag-addednow source the specific tag entry (so removing tagsecuritypoints at the- securityline) and set only the side the tag exists on.Changelog verdicts
stringtoobjectunder a loosely typed media type likeapplication/xmlis backward compatible only because everything on the wire is a string, not a genuine narrowing, yet it was reported asresponse-body-type-specialized("was narrowed from string to object"). Such swaps are now rerouted to four new INFO verdicts,request-body-type-compatible,request-property-type-compatible,response-body-type-compatible, andresponse-property-type-compatible, worded "changed from X to Y (backward compatible)". Genuine narrowing or widening, and adding or removing the type constraint entirely, keep their existing verdicts.Misc
numbertointeger" becomes "was narrowed fromnumbertointeger", matching the phrasing the list-of-types messages already use, in all four locales. Message text only: the rule ids and their descriptions keep the generalize/specialize terms.changelog - -builds both sides from a single stdin read (#1082). When base and revision are both-, the revision was previously loaded from the already-exhausted stdin and patched afterwards, leaving its spec version internally inconsistent and relying on the parser accepting empty input. Both sides are now constructed from one read; output is unchanged (no changes reported, exit 0).Go package changes
checkerhelpers are unexported (#1072). `OperationFielConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.