Skip to content

Conversation

@martincostello
Copy link
Collaborator

Cherry-pick changes from #3283:

  • Remove usage of IWebHost in tests.
  • Style tweaks and use of newer C# features.
  • Update NuGet packages to their latest versions.
  • Assert OpenAPI documents have no warnings.

- Remove usage of `IWebHost` in tests.
- Style tweaks and use of newer C# features.
- Update NuGet packages to their latest versions.
- Assert OpenAPI documents have no warnings.
Update to September patch versions.
@martincostello martincostello added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Sep 10, 2025
@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.28%. Comparing base (c7cad21) to head (17bb5fb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3565   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files         110      110           
  Lines        3816     3816           
  Branches      723      723           
=======================================
  Hits         3598     3598           
  Misses        218      218           
Flag Coverage Δ
Linux 94.28% <ø> (ø)
Windows 94.28% <ø> (ø)
macOS 94.28% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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 marked this pull request as ready for review September 10, 2025 15:24
Copilot AI review requested due to automatic review settings September 10, 2025 15:24
@martincostello martincostello merged commit 6f77d1e into master Sep 10, 2025
14 checks passed
@martincostello martincostello deleted the dotnet-10-prep branch September 10, 2025 15:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prepares the codebase for .NET 10 by modernizing test infrastructure and updating dependencies. The changes focus on removing deprecated IWebHost usage in favor of the newer hosting model and applying various style improvements.

  • Migrated test infrastructure from IWebHost to the generic IHost pattern
  • Updated NuGet packages to their latest patch versions
  • Added OpenAPI warnings validation to ensure document quality
  • Applied C# style improvements including target-typed new expressions and trailing commas

Reviewed Changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/WebSites/WebApi/WebApi.csproj Updated Microsoft.AspNetCore.OpenApi to version 9.0.9
test/WebSites/WebApi/EndPoints/OpenApiEndpoints.cs Added trailing newline for consistent formatting
test/WebSites/ReDoc/Startup.cs Added root redirect endpoint to api-docs
test/WebSites/OAuth2Integration/OAuth2Integration.csproj Updated authentication packages to latest versions
test/WebSites/MvcWithNullable/MvcWithNullable.csproj Updated Microsoft.AspNetCore.OpenApi to version 9.0.9
test/Swashbuckle.AspNetCore.IntegrationTests/VerifyTests.cs Added outputHelper parameter to TestSiteAutofaq constructor
test/Swashbuckle.AspNetCore.IntegrationTests/TestSiteAutofaq.cs Refactored to inherit from TestSite and use IHost instead of IWebHost
test/Swashbuckle.AspNetCore.IntegrationTests/TestSite.cs Major refactor from IWebHost to IHost with improved configuration
test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj Updated testing packages to latest versions
test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs Added warnings validation and TestSiteAutofaq constructor fix
test/Swashbuckle.AspNetCore.IntegrationTests/DocumentProviderTests.cs Updated service access from Host.Services to Services
test/Swashbuckle.AspNetCore.IntegrationTests/CustomDocumentSerializerTests.cs Updated service access from Host.Services to Services
test/Swashbuckle.AspNetCore.ApiTesting.Test/*.cs Applied style improvements with trailing commas and target-typed new
test/Swashbuckle.AspNetCore.Annotations.Test/*.cs Applied style improvements and simplified method declarations
src/Swashbuckle.AspNetCore.Cli/Program.cs Added pragma warnings to suppress IWebHost deprecation warnings
Directory.Packages.props Updated ASP.NET Core packages to latest patch versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

This was referenced Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants