Skip to content

[Dto]: drop FluentValidation integration from CRUD/DTO generation#10

Merged
MistyKuu merged 1 commit intomasterfrom
claude/drop-fluentvalidation-support
Apr 21, 2026
Merged

[Dto]: drop FluentValidation integration from CRUD/DTO generation#10
MistyKuu merged 1 commit intomasterfrom
claude/drop-fluentvalidation-support

Conversation

@MistyKuu
Copy link
Copy Markdown
Owner

The generator used to detect FluentValidation.AbstractValidator`1 in the compilation and, when present, emit a FluentDtoValidator bridge class plus {RequestName}Create/UpdateBaseValidator scaffolds wired onto each generated DTO. This dragged the external FluentValidation package into every project that generated CRUD DTOs and had it referenced anywhere transitively.

We no longer want that dependency. Removed:

  • FluentDtoValidatorSource constant (the FluentValidation bridge base class)
  • hasFluentValidation CompilationProvider gate
  • RegisterSourceOutput that emitted FluentDtoValidator.g.cs
  • GenerateFluentBaseValidator and all its call-sites
  • hasFluent parameter plumbing through GenerateSource / EmitDeduplicatedNested and every Combine() chain that fed it
  • docs pages that described the FluentValidation bridge

Kept: IDtoValidator, DtoValidationResult, and [Create/Update/CreateOrUpdate]
Validator / CreateValidator / UpdateValidator attribute properties — those
are generic and let users point at any custom validator implementation.

The generator used to detect FluentValidation.AbstractValidator`1 in the
compilation and, when present, emit a FluentDtoValidator<T> bridge class
plus {RequestName}Create/UpdateBaseValidator scaffolds wired onto each
generated DTO. This dragged the external FluentValidation package into
every project that generated CRUD DTOs and had it referenced anywhere
transitively.

We no longer want that dependency. Removed:
- FluentDtoValidatorSource constant (the FluentValidation bridge base class)
- hasFluentValidation CompilationProvider gate
- RegisterSourceOutput that emitted FluentDtoValidator.g.cs
- GenerateFluentBaseValidator and all its call-sites
- hasFluent parameter plumbing through GenerateSource / EmitDeduplicatedNested
  and every Combine() chain that fed it
- docs pages that described the FluentValidation bridge

Kept: IDtoValidator<T>, DtoValidationResult, and [Create/Update/CreateOrUpdate]
  Validator / CreateValidator / UpdateValidator attribute properties — those
  are generic and let users point at any custom validator implementation.
@MistyKuu MistyKuu merged commit bfb5609 into master Apr 21, 2026
1 check failed
@MistyKuu MistyKuu deleted the claude/drop-fluentvalidation-support branch April 21, 2026 08:33
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.

1 participant