feat(aspnetcore): outbox, command dead letter, and audit inspector endpoints; opt-in OpenAPI metadata - #687
Merged
Conversation
…r endpoints; opt-in OpenAPI metadata Adds three minimal API inspector surfaces under NetEvolve.Pulse.AspNetCore: - MapOutboxInspector: stats, dead-letter listing/count/lookup, single and bulk replay against IOutboxManagement. - MapCommandDeadLetterInspector: stats, pending entries, replay and dismiss against ICommandDeadLetterManagement. - MapAuditInspector: read-only stats and filtered entry queries against IAuditManagement. Endpoint sets are adapted to what each management interface actually exposes; operations without an existence signal (e.g. dead letter replay/dismiss) return 204 unconditionally instead of a fabricated 404, and get-by-id endpoints implied by the original issues were dropped where no such lookup exists on the interface. Also adds opt-in and global OpenAPI metadata support for MapCommand/MapQuery/MapStreamQuery: - RouteHandlerBuilderExtensions (WithPulseSummary, WithPulseDescription, WithPulseTag, WithPulseProduces, WithPulseStreamProduces). - XmlDocumentationReader for reading <summary> text from generated XML documentation files, with per-assembly and per-type caching. - IMediatorBuilder.EnableOpenApiMetadata() to auto-apply summary and produces metadata across all three Map* methods via AspNetCoreOptions. Closes #288, #289, #290, #291, #292, #293, #294, #295
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #687 +/- ##
==========================================
- Coverage 95.31% 95.28% -0.04%
==========================================
Files 254 264 +10
Lines 9631 9813 +182
Branches 838 869 +31
==========================================
+ Hits 9180 9350 +170
- Misses 241 244 +3
- Partials 210 219 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Combines the four ready-to-implement inspector/OpenAPI feature+test issue pairs into one PR:
MapOutboxInspector: stats, dead-letter listing/count/lookup, single and bulk replay againstIOutboxManagement.MapCommandDeadLetterInspector: stats, pending entries, replay and dismiss againstICommandDeadLetterManagement.MapAuditInspector: read-only stats and filtered entry queries againstIAuditManagement.WithPulseSummary/WithPulseDescription/WithPulseTag/WithPulseProduces/WithPulseStreamProducesonRouteHandlerBuilder, plusEnableOpenApiMetadata()onIMediatorBuilderto auto-apply summary/produces metadata acrossMapCommand/MapQuery/MapStreamQuery.Deviations from the original issue text
The three inspector issues describe endpoints against an idealized management API that doesn't match what
IOutboxManagement,ICommandDeadLetterManagement, andIAuditManagementactually expose today. Rather than fabricating behavior, the endpoint sets were adapted to the real interfaces:GET /entries/{id}(no get-by-id method on the interface).replay/dismissreturn204 No Contentunconditionally —ReplayAsync/DismissAsyncreturnTask, notbool, so there's no "not found" signal to surface as 404.GET /entries/{id}—IAuditManagementexposes onlyQueryAsync(AuditFilter)andGetStatisticsAsync().IOutboxManagementonly exposes dead-letter operations.Notes
GenerateDocumentationFileenabled onNetEvolve.Pulse.AspNetCore.csprojonly (required forXmlDocumentationReaderto have anything to read); no changes toDirectory.Build.props/Directory.Packages.props/.editorconfig.OutboxMessage.EventType(a rawType) wasn't JSON-serializable, andAuditFilter's non-nullableTake/Skipmade[AsParameters]binding treat them as required, rejecting requests without explicittake/skipquery values.Testing
dotnet build Pulse.slnx— 0 warnings, 0 errors (net8.0/net9.0/net10.0).dotnet test(NetEvolve.Pulse.Tests.Unit, net10.0) — 1979 passed, 0 failed, 0 skipped.dotnet format --verify-no-changesclean on all touched files.Closes #288, #289, #290, #291, #292, #293, #294, #295