-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[release/8.0-staging] Support IValidatableObject for nested model types in options source gen #94062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0-staging] Support IValidatableObject for nested model types in options source gen #94062
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-options Issue DetailsBackport of #93952 to release/8.0-staging /cc @tarekgh Customer ImpactCustomers who employ nested options objects and rely on the TestingThe changes have successfully passed all regression tests, and we have additionally introduced new tests that cover the specific scenario affected by these changes. RiskThis fix is narrowly scoped to a one-line change, targeting only the scenario that was failing. IMPORTANT: If this backport is for a servicing release, please verify that:
|
@ericstj @carlossanlop could you please help review the package authoring part? |
@@ -4,6 +4,8 @@ | |||
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.1;netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks> | |||
<EnableDefaultItems>true</EnableDefaultItems> | |||
<IsPackable>true</IsPackable> | |||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | |||
<ServicingVersion>1</ServicingVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 cc @carlossanlop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats @tarekgh, you're the first one to service an 8.0 package :)
This is approved offline by email. |
Backport of #93952 to release/8.0-staging
/cc @tarekgh
Customer Impact
Customers who employ nested options objects and rely on the
IValidateObject
interface may notice that nested object validation is skipped when using the source generator. This omission can lead to unexpected behavior in the affected application. This issue has been reported by a partner team.Testing
The changes have successfully passed all regression tests, and we have additionally introduced new tests that cover the specific scenario affected by these changes.
Risk
This fix is narrowly scoped to a one-line change, targeting only the scenario that was failing.
IMPORTANT: If this backport is for a servicing release, please verify that:
The PR target branch is
release/X.0-staging
, notrelease/X.0
.If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.