Skip to content

feat(aspnetcore): outbox, command dead letter, and audit inspector endpoints; opt-in OpenAPI metadata - #687

Merged
samtrion merged 1 commit into
mainfrom
feat/inspector-endpoints-and-openapi-metadata
Aug 5, 2026
Merged

feat(aspnetcore): outbox, command dead letter, and audit inspector endpoints; opt-in OpenAPI metadata#687
samtrion merged 1 commit into
mainfrom
feat/inspector-endpoints-and-openapi-metadata

Conversation

@samtrion

@samtrion samtrion commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Combines the four ready-to-implement inspector/OpenAPI feature+test issue pairs into one PR:

Deviations from the original issue text

The three inspector issues describe endpoints against an idealized management API that doesn't match what IOutboxManagement, ICommandDeadLetterManagement, and IAuditManagement actually expose today. Rather than fabricating behavior, the endpoint sets were adapted to the real interfaces:

  • Command Dead Letter Inspector: no GET /entries/{id} (no get-by-id method on the interface). replay/dismiss return 204 No Content unconditionally — ReplayAsync/DismissAsync return Task, not bool, so there's no "not found" signal to surface as 404.
  • Audit Inspector: no GET /entries/{id}IAuditManagement exposes only QueryAsync(AuditFilter) and GetStatisticsAsync().
  • Outbox Inspector: no generic "pending messages" listing or dismiss endpoint — IOutboxManagement only exposes dead-letter operations.

Notes

  • GenerateDocumentationFile enabled on NetEvolve.Pulse.AspNetCore.csproj only (required for XmlDocumentationReader to have anything to read); no changes to Directory.Build.props/Directory.Packages.props/.editorconfig.
  • Found and fixed two real production defects surfaced while wiring this up: OutboxMessage.EventType (a raw Type) wasn't JSON-serializable, and AuditFilter's non-nullable Take/Skip made [AsParameters] binding treat them as required, rejecting requests without explicit take/skip query 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-changes clean on all touched files.

Closes #288, #289, #290, #291, #292, #293, #294, #295

…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
@samtrion
samtrion requested a review from a team as a code owner August 4, 2026 21:06
@samtrion
samtrion requested a review from benwirren August 4, 2026 21:06
@samtrion samtrion self-assigned this Aug 4, 2026
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.89189% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.28%. Comparing base (7b9dcd7) to head (fc38267).

Files with missing lines Patch % Lines
...lse.AspNetCore/Internals/XmlDocumentationReader.cs 84.21% 4 Missing and 5 partials ⚠️
...Pulse.AspNetCore/EndpointRouteBuilderExtensions.cs 84.00% 1 Missing and 3 partials ⚠️
...ve.Pulse.AspNetCore/Internals/TypeJsonConverter.cs 80.00% 1 Missing ⚠️
....Pulse.AspNetCore/RouteHandlerBuilderExtensions.cs 93.75% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samtrion
samtrion merged commit 321e673 into main Aug 5, 2026
11 checks passed
@samtrion
samtrion deleted the feat/inspector-endpoints-and-openapi-metadata branch August 5, 2026 14:27
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.

feat: OpenAPI metadata extension methods for MapCommand, MapQuery, MapStreamQuery (opt-in and global)

1 participant