Skip to content

ci: stop Dependabot proposing Microsoft.OpenApi 3.x - #704

Merged
hokiepokedad2 merged 1 commit into
developfrom
chore/ignore-openapi-major
Aug 10, 2026
Merged

ci: stop Dependabot proposing Microsoft.OpenApi 3.x#704
hokiepokedad2 merged 1 commit into
developfrom
chore/ignore-openapi-major

Conversation

@hokiepokedad2

Copy link
Copy Markdown
Contributor

#702 bumps Microsoft.OpenApi 2.7.5 → 3.9.0 and fails the backend build. It is unfixable here, not merely broken.

Why it cannot build

3.0 made IOpenApiMediaType.Example read-only. Microsoft.AspNetCore.OpenApi 10.0.10's XML comment source generator still assigns it:

OpenApiXmlCommentSupport.generated.cs(399,41): error CS0200: Property or indexer
'IOpenApiMediaType.Example' cannot be assigned to -- it is read only

That file is generated at build time by the ASP.NET Core package. No edit in this repository reaches it, so the only options are to stay on 2.x or drop OpenAPI support.

Why we cannot just drop the direct reference

The csproj comment names the exit condition: the pin exists solely to clear GHSA-v5pm-xwqc-g5wc, because Microsoft.AspNetCore.OpenApi 10.0.10 pins the vulnerable Microsoft.OpenApi 2.0.0 transitively. I checked NuGet — 10.0.10 is still the newest release, so no patched floor exists yet and the pin has to stay.

Change

Ignore major updates for Microsoft.OpenApi only, matching how the npm ecosystem already ignores Angular, Angular Material and TypeScript majors.

Minor and patch updates inside 2.x still come through, so a later advisory in that line is not masked. 2.11.0 is available and should arrive on the next run.

Not a silent cap

The ignore carries its reason, the exact compiler error, and the condition for removing it, so whoever sees a 3.x release land does not have to rediscover why it was blocked.

Worth noting the auto-merge workflow behaved correctly here: #702 is a group PR containing a major, and the #344 guard held it for review rather than merging a broken build.

Closes #702.

The 3.0 object model made IOpenApiMediaType.Example read-only, and
Microsoft.AspNetCore.OpenApi 10.0.10's source generator still assigns it, so the
bump fails in generated code:

  OpenApiXmlCommentSupport.generated.cs: error CS0200: Property or indexer
  IOpenApiMediaType.Example cannot be assigned to -- it is read only

Nothing in this repository can reach that, so the PR is unfixable rather than
merely broken, and Dependabot would reopen it every Monday.

The direct Microsoft.OpenApi reference exists only to clear
GHSA-v5pm-xwqc-g5wc, which Microsoft.AspNetCore.OpenApi reintroduces by pinning
2.0.0 transitively. Only majors are ignored, so 2.x minors and patches still
arrive and a later advisory in that line is not masked -- 2.11.0 is available
and will come through on the next run.

Same shape as the existing Angular and TypeScript major ignores. Drop it once
Microsoft.AspNetCore.OpenApi ships a release built against 3.x, at which point
the direct reference should go too.
@github-actions github-actions Bot added the chore label Aug 10, 2026
@hokiepokedad2
hokiepokedad2 merged commit 3e0bcfd into develop Aug 10, 2026
5 checks passed
@hokiepokedad2
hokiepokedad2 deleted the chore/ignore-openapi-major branch August 10, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant