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 Jan 4, 2026
wengwalker added a commit to wengwalker/Items-shop that referenced this pull request Jan 10, 2026
Updated
[Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)
from 10.0.1 to 10.1.0.

<details>
<summary>Release notes</summary>

_Sourced from [Swashbuckle.AspNetCore's
releases](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)._

## 10.1.0

## What's Changed

### New Features

* Add public method `SchemaRepository.ReplaceSchemaId` by @​bkoelman in
domaindrivendev/Swashbuckle.AspNetCore#3708

### Bug Fixes

* Exclude inherited properties only when base added to `AllOf` by
@​John-Paul-R in
domaindrivendev/Swashbuckle.AspNetCore#3692

### Miscellaneous

* Add clarifying example in migration guide to v10 by @​markuspalme in
domaindrivendev/Swashbuckle.AspNetCore#3672
* Add markdown linter by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3673
* Update dependencies by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3685
* Validate OpenAPI documents create valid C# clients by @​martincostello
in domaindrivendev/Swashbuckle.AspNetCore#3686
* End-to-end client validation tests by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3687
* Add NSwag client test by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3689
* Fix GitHub step summaries by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3691
* Clarify compatibility by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3694
* Update zizmor by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3695
* Suppress zizmor false-positive by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3696
* Refactor tests by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3705
* Use NuGet Trusted Publishing by @​martincostello in
domaindrivendev/Swashbuckle.AspNetCore#3574
* Annotate `TryLookupByType` with nullability hints by @​martincostello
in domaindrivendev/Swashbuckle.AspNetCore#3719
* Bump swagger-ui-dist to 5.31.0 by @​dependabot in
domaindrivendev/Swashbuckle.AspNetCore#3720

## New Contributors

* @​markuspalme made their first contribution in
domaindrivendev/Swashbuckle.AspNetCore#3672
* @​John-Paul-R made their first contribution in
domaindrivendev/Swashbuckle.AspNetCore#3692

**Full Changelog**:
domaindrivendev/Swashbuckle.AspNetCore@v10.0.1...v10.1.0


Commits viewable in [compare
view](domaindrivendev/Swashbuckle.AspNetCore@v10.0.1...v10.1.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Swashbuckle.AspNetCore&package-manager=nuget&previous-version=10.0.1&new-version=10.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
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