Skip to content

Add coverage for AddServer across multiple documents - #4115

Merged
martincostello merged 1 commit into
domaindrivendev:masterfrom
RaphaelFakhri:test/multi-document-servers
Aug 20, 2026
Merged

martincostello merged 1 commit into
domaindrivendev:masterfrom
RaphaelFakhri:test/multi-document-servers

Conversation

@RaphaelFakhri

Copy link
Copy Markdown
Contributor

GetSwagger_SupportsOption_Servers generates a single document, so nothing currently pins that servers configured through AddServer reach every document rather than only the first one requested. This adds a two-document variant that asserts it for both.

Test only, no source changes. Swashbuckle.AspNetCore.SwaggerGen.Test passes on net8.0, net9.0 and net10.0 with 761 tests, 0 failed.

I wrote this while looking into #3306 and thought the coverage was worth keeping regardless of where that issue lands; it asserts current behaviour and is not a fix for anything.

GetSwagger_SupportsOption_Servers only generates one document, so nothing
pinned that the configured servers reach every document rather than the first
one asked for. Add a two-document variant that asserts it for both.
@codecov

codecov Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.21%. Comparing base (98c3501) to head (83f622c).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4115   +/-   ##
=======================================
  Coverage   95.21%   95.21%           
=======================================
  Files         111      111           
  Lines        4115     4115           
  Branches      843      843           
=======================================
  Hits         3918     3918           
  Misses        197      197           
Flag Coverage Δ
Linux 95.21% <ø> (ø)
Windows 95.21% <ø> (ø)
macOS 95.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello martincostello left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@martincostello
martincostello merged commit eedf135 into domaindrivendev:master Aug 20, 2026
14 checks passed
This was referenced Oct 7, 2026
This was referenced Oct 11, 2026
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