Skip to content

Commit 6939a1a

Browse files
committed
feat(validation): add multi-validator support and prevent handler execution on failure
1 parent 5271416 commit 6939a1a

41 files changed

Lines changed: 1093 additions & 547 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# CHANGELOG
22

3+
## v1.1.0 — Validation Pipeline Hardening & Web API Focus
4+
5+
### Changed
6+
- Refactored `Dispatcher` to use **strongly-typed task handling**
7+
- Removed all `dynamic` usage
8+
- Ensured `Task<TResult>` is awaited and returned safely
9+
- Dispatcher now correctly enforces **validation-before-handler execution**
10+
- Validation pipeline fully aggregates errors from **multiple validators**
11+
- Removed console sample from core focus to align library with **Web API–first usage**
12+
- Standardized CQRS registration via **feature assembly scanning**
13+
- Improved DI scoping correctness for validators and handlers
14+
- Clarified reusable-library boundaries (MinimalCQRS remains application-agnostic)
15+
16+
### Added
17+
- Comprehensive **unit test project** for MinimalCQRS
18+
- Dispatcher behavior tests
19+
- Validation aggregation tests
20+
- Handler invocation guards
21+
- **Test doubles** for commands, queries, handlers, and validators
22+
- Web API **integration tests** covering:
23+
- Missing request body (400)
24+
- Validation errors (400)
25+
- Successful command execution (200)
26+
- Feature assembly **marker pattern** to avoid brittle `Program.Assembly` scanning
27+
- Improved exception handling coverage for validation failures
28+
29+
### Removed
30+
- Console sample project from main solution focus (kept library Web API–oriented)
31+
32+
### Fixed
33+
- Validation exceptions not being surfaced consistently
34+
- Incorrect assumptions about validator discovery across assemblies
35+
- Dispatcher behavior when handlers or validators are missing
36+
- Test expectations not matching actual handler contracts
37+
38+
---
39+
340
## v1.0.0 — Initial Release
441

542
### Added

MinimalCQRS.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
</Folder>
77
<Folder Name="/src/">
88
<Project Path="src/MinimalCQRS.Sample.Api/MinimalCQRS.Sample.Api.csproj" />
9-
<Project Path="src/MinimalCQRS.SampleConsole/MinimalCQRS.SampleConsole.csproj" />
109
<Project Path="src/MinimalCQRS/MinimalCQRS.csproj" />
1110
</Folder>
1211
<Folder Name="/tests/">
12+
<Project Path="tests/MinimalCQRS.Sample.Api.Tests/MinimalCQRS.Sample.Api.Tests.csproj" />
1313
<Project Path="tests/MinimalCQRS.Tests/MinimalCQRS.Tests.csproj" />
1414
</Folder>
1515
</Solution>

0 commit comments

Comments
 (0)