Skip to content

Conversation

@martincostello
Copy link
Collaborator

- Rename classes from #3692 for clarity.
- Some style refactoring.
Copilot AI review requested due to automatic review settings December 3, 2025 17:30
@martincostello martincostello enabled auto-merge (rebase) December 3, 2025 17:30
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 refactors test code for clarity by renaming classes and properties from the cryptic AbcTests_A/B/C and PropA/B/C naming scheme to more descriptive names like BaseClass, DerivedClass, MostDerivedClass and corresponding properties. Additionally, minor style improvements were applied to improve code consistency.

  • Renamed test classes from AbcTests_A/B/C to BaseClass, DerivedClass, MostDerivedClass
  • Renamed properties from PropA/B/C to BaseProperty, DerivedProperty, MoreDerivedProperty
  • Applied style refactoring including formatting improvements and added documentation reference

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.DotNet9_0.verified.txt Updated snapshot to reflect renamed classes and properties
test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.DotNet8_0.verified.txt Updated snapshot to reflect renamed classes and properties
test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/VerifyTests.GenerateSchema_PreservesMultiLevelInheritance.DotNet10_0.verified.txt Updated snapshot to reflect renamed classes and properties
test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.DotNet9_0.verified.txt Updated snapshot to reflect renamed classes and properties
test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.DotNet8_0.verified.txt Updated snapshot to reflect renamed classes and properties
test/Swashbuckle.AspNetCore.SwaggerGen.Test/snapshots/VerifyTests.GenerateSchema_PreservesIntermediateBaseProperties_WhenUsingOneOfPolymorphism.DotNet10_0.verified.txt Updated snapshot to reflect renamed classes and properties
test/Swashbuckle.AspNetCore.SwaggerGen.Test/VerifyTests.cs Updated test methods to use renamed classes and applied formatting improvements to collection expressions
test/Swashbuckle.AspNetCore.SwaggerGen.Test/SchemaGenerator/JsonSerializerSchemaGeneratorTests.cs Updated test classes from AbcTests_A/B/C to ModelOfA/B/C with more descriptive property names
test/Swashbuckle.AspNetCore.SwaggerGen.Test/Fixtures/FakeControllerWithInheritance.cs Renamed nested test classes and properties, added pragma directive, base class inheritance, and null assertion
src/Swashbuckle.AspNetCore.SwaggerGen/SchemaGenerator/SchemaGenerator.cs Improved code formatting and added documentation reference comment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1241 to +1242
type == typeof(FakeControllerWithInheritance.BaseClass) ? [typeof(FakeControllerWithInheritance.DerivedClass), typeof(FakeControllerWithInheritance.MostDerivedClass)]
: type == typeof(FakeControllerWithInheritance.DerivedClass) ? [typeof(FakeControllerWithInheritance.MostDerivedClass)]
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

[nitpick] This line exceeds a reasonable line length (approximately 170 characters). Consider breaking this into multiple lines for better readability, similar to the formatting used in the previous test method (lines 1172-1175).

Suggested change
type == typeof(FakeControllerWithInheritance.BaseClass) ? [typeof(FakeControllerWithInheritance.DerivedClass), typeof(FakeControllerWithInheritance.MostDerivedClass)]
: type == typeof(FakeControllerWithInheritance.DerivedClass) ? [typeof(FakeControllerWithInheritance.MostDerivedClass)]
type == typeof(FakeControllerWithInheritance.BaseClass)
? [typeof(FakeControllerWithInheritance.DerivedClass), typeof(FakeControllerWithInheritance.MostDerivedClass)]
: type == typeof(FakeControllerWithInheritance.DerivedClass)
? [typeof(FakeControllerWithInheritance.MostDerivedClass)]

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.66%. Comparing base (025ae09) to head (60254f2).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3705      +/-   ##
==========================================
- Coverage   94.66%   94.66%   -0.01%     
==========================================
  Files         111      111              
  Lines        3859     3858       -1     
  Branches      778      778              
==========================================
- Hits         3653     3652       -1     
  Misses        206      206              
Flag Coverage Δ
Linux 94.66% <100.00%> (-0.01%) ⬇️
Windows 94.66% <100.00%> (-0.01%) ⬇️
macOS 94.66% <100.00%> (-0.01%) ⬇️

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 merged commit 3afee04 into master Dec 3, 2025
20 checks passed
@martincostello martincostello deleted the gh-3692-tweaks branch December 3, 2025 17:41
This was referenced Dec 12, 2025
This was referenced Dec 22, 2025
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