Repository navigation
Move validation into Application and replace MediatR with Mediator - #10
Merged
Merged
Conversation
CodeQL flags each undisposed CancellationTokenSource. Create them with a using declaration instead.
Application now matches CleanMinimalApi: validators and a ValidationBehaviour live in Application, and Mediator replaces MediatR 11. The unused Presentation validators and request models are removed. Tools drop their try/catch blocks and a single call-tool filter maps validation, not-found and unexpected errors to MCP error results without leaking exception messages.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
=======================================
Coverage 99.71% 99.72%
=======================================
Files 39 42 +3
Lines 356 358 +2
Branches 8 11 +3
=======================================
+ Hits 355 357 +2
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…alidation # Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ValidationBehaviour, and Mediator 3.0.2 replaces MediatR 11.try/catchblocks. A single call-tool filter returns MCP error results:Validation Failed: <field>: <message>,Not Found: <message>, or a generic error that no longer leaks the exception message.Includes the commit from #9, which drops out once that merges.