Skip to content

ci: let ASP.NET Core decide when Microsoft.OpenApi moves major - #17

Merged
Reefact merged 1 commit into
mainfrom
claude/block-openapi-majors
Aug 8, 2026
Merged

ci: let ASP.NET Core decide when Microsoft.OpenApi moves major#17
Reefact merged 1 commit into
mainfrom
claude/block-openapi-majors

Conversation

@Reefact

@Reefact Reefact commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Freezes the major line of Microsoft.OpenApi for Dependabot. #9 proposed 2.11.0 → 3.9.0 and turned the build red inside generated code, for a reason nothing on this side can address.

Type of change

  • Bug fix
  • New feature
  • Breaking change to the public API
  • Refactoring
  • Analyzer / diagnostic change
  • Tests
  • Build / CI / tooling

Changes

  • One ignore entry in .github/dependabot.yml, scoped to version-update:semver-major on Microsoft.OpenApi.

Why it is needed, in short: Microsoft.AspNetCore.OpenApi 10.0.x is compiled against the 2.x API and ships a source generator that writes into this project. Under 3.x that generated code no longer compiles — IOpenApiMediaType.Example became read-only — so the build fails in OpenApiXmlCommentSupport.generated.cs, a file nobody here wrote. The package's .targets exposes no property to disable the generator, so there is no local fix.

The limit is invisible to tooling: the nuspec declares a 2.0.0 floor and no ceiling, so NuGet resolves 3.9.0 happily and Dependabot sees a routine bump. The incompatibility exists only in the generator's compiled form and in one sentence of the 3.0.0 release notes ("ASP.net users should remain on […] version 2.X for ASP.net 10"). A constraint no tool can read has to be written down somewhere — hence this entry.

Only the major is frozen, deliberately. The explicit Microsoft.OpenApi 2.11.0 reference in the OpenApi project exists to stay clear of GHSA-v5pm-xwqc-g5wc, so 2.x updates must keep arriving. Ignoring the dependency outright — the way Microsoft.CodeAnalysis.* is ignored above — would trade a broken build for a silent one on a package that was pinned for a security advisory in the first place.

This has an expiry date: Microsoft.AspNetCore.OpenApi 11.0.0-preview already depends on Microsoft.OpenApi 3.6.0, so the major arrives on its own the day this repository targets net11.0. The entry is then deleted, not revisited.

Testing

  • dotnet build -c Release — clean, warnings are errors here
  • dotnet test -c Release
  • tests/PackageSmokeTest/run.sh

Not run, and not applicable: this touches only .github/dependabot.yml, which no build step reads and no compiled code references. The file was parsed and the resulting ignore list inspected to confirm the entry is scoped to the major and does not widen the existing freezes.

Public API

  • No change to the public surface
  • The surface changed and the baseline was updated in the same commit

Documentation

  • README / docs/ updated
  • The French counterpart was updated to match
  • CHANGELOG.md and docs/CHANGELOG.fr.md both updated
  • No documentation change required

The reasoning lives in the config file itself, beside the entry it explains, in the same form as the freezes already there.

Related issues

Closes #9.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VZGwf9Cqea1f6sv2sEreQK


Generated by Claude Code

Dependabot proposed Microsoft.OpenApi 2.11.0 -> 3.9.0 and the build went
red in a file nobody here wrote: the source generator shipped inside
Microsoft.AspNetCore.OpenApi 10.0.x assigns IOpenApiMediaType.Example,
which the 3.x major made read-only. Nothing on this side can fix that. The
generator is Microsoft's, it is compiled against the 2.x API, and the
.targets exposes no way to switch it off — so the ceiling is ASP.NET
Core's, not a preference held here.

Nothing in the metadata carries it either. The nuspec declares a 2.0.0
floor and no ceiling, so NuGet resolves 3.9.0 without complaint and
Dependabot reads an ordinary bump; the incompatibility exists only in the
generator's compiled form and in a sentence of the release notes. A limit
no tool can see is one that has to be written down, which is what this
entry does.

Only the major is frozen, and the restraint matters as much as the freeze:
the explicit 2.11.0 reference in the OpenApi project is there to stay clear
of GHSA-v5pm-xwqc-g5wc, so 2.x updates have to keep arriving. Freezing the
dependency outright — as Microsoft.CodeAnalysis.* is frozen above — would
have traded a broken build for a silent one, and this is a package whose
whole reason for pinning was a security advisory.

This is a decision with an expiry date. Microsoft.AspNetCore.OpenApi
11.0.0-preview already depends on Microsoft.OpenApi 3.6.0, so the major
arrives on its own the day this repository targets net11.0 — carried in by
the framework, with the compiler pointing at whatever OpenApiSchema
reshaped. The entry is then deleted rather than revisited.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZGwf9Cqea1f6sv2sEreQK
@Reefact
Reefact merged commit 34332e3 into main Aug 8, 2026
7 checks passed
@Reefact
Reefact deleted the claude/block-openapi-majors branch August 8, 2026 09:25
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.

2 participants