Skip to content

Stop Dependabot from proposing Microsoft.OpenApi 3.x - #116

Merged
malinfossum merged 3 commits into
mainfrom
chore/dependabot-ignore-openapi-major
Nov 19, 2026
Merged

malinfossum merged 3 commits into
mainfrom
chore/dependabot-ignore-openapi-major

Conversation

@malinfossum

@malinfossum malinfossum commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

What

One ignore rule, in two Dependabot configs: Dependabot skips major bumps of Microsoft.OpenApi.

  • .github/dependabot.yml: covers the nuget block for scaffolds/csharp-api in this repo.
  • scaffolds/csharp-api/.github/dependabot.yml: the config a project copied from the scaffold starts with. It has the same explicit pin, so it would get the same failing PR.

Why

Microsoft.AspNetCore.OpenApi 10.0.15 requires Microsoft.OpenApi (>= 2.13.0 && < 3.0.0). The 3.11.1 bump in #109 fails restore with NU1608 on both App.Api and App.Tests, and it will keep failing for every 3.x release while the scaffold is on .NET 10.

I posted @dependabot ignore this major version on #109 twice and Dependabot never answered, so the ignore lives in the config file instead, where it is visible and reviewable. Minor and patch bumps of Microsoft.OpenApi still arrive in the nuget-minor-patch group.

Verified

  • Root tests: 221 of 221 pass.
  • The NU1608 text above is read off the failed ward / dotnet job on Bump Microsoft.OpenApi from 2.13.1 to 3.11.1 #109.
  • GitHub's own .github/dependabot.yml check passed on the root file. The scaffold file carries the same five lines at the same indent; nothing validates it until a project uses it.

Review

/code-review high, two rounds, no bugs. Two notes fixed: the comment now names Microsoft.AspNetCore.OpenApi as the package to recheck, and the scaffold's own config carries the rule. One stays, one was a false alarm:

  • The ignore has no upper bound. It stays because Microsoft.OpenApi is an explicit pin in App.Api/App.Api.csproj: when the framework package raises its floor past the pin, restore fails on the downgrade and points straight at it. The comment on the rule names the recheck trigger.
  • The rule is not in the Ward template the file headers name. No change needed: planDependabot in Ward's tools/apply.mjs keeps an existing dependabot.yml whenever its ecosystem blocks are present and never overwrites one.

Microsoft.AspNetCore.OpenApi 10.x requires Microsoft.OpenApi below 3.0.0, so every
3.x bump fails restore with NU1608. The ignore comment on the PR never registered,
so the rule lives in dependabot.yml where I can see it.
A project copied from the scaffold has the same explicit pin and would get the
same failing 3.x PR.
@malinfossum
malinfossum merged commit f561e54 into main Nov 19, 2026
14 checks passed
@malinfossum
malinfossum deleted the chore/dependabot-ignore-openapi-major branch November 19, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant