Skip to content

fix: correct default mapper docs and preserve sample greetings - #4413

Merged
iancooper merged 6 commits into
BrighterCommand:masterfrom
gabisonia:fix/4277-default-mapper-docs-and-greeting
Sep 25, 2026
Merged

iancooper merged 6 commits into
BrighterCommand:masterfrom
gabisonia:fix/4277-default-mapper-docs-and-greeting

Conversation

@gabisonia

Copy link
Copy Markdown
Contributor

Description

The default mapper is JsonMessageMapper<>, but 13 XML documentation sites describe a CloudEvents JSON envelope. Correct those descriptions and resolve the generic mapper references. Add 12 regression cases asserting plain JSON round trips through the sync and async defaults registered with AddBrighter and AddConsumers.

The RMQTaskQueue sample also loses Greeting during deserialization because its parameterless constructor leaves a getter-only property unpopulated. Add the public setter proposed in the issue so the greeting survives the round trip.

Related Issues

Fixes #4277

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the Contributing Guide
  • I have checked the documentation for relevant guidance (repository core guide and FirstMessage tutorial)
  • I have added/updated XML documentation for any public API changes
  • I have added/updated tests as appropriate
  • My changes follow the existing code style and conventions

Additional Notes

Validation:

  • Core suite: 1,040 passed and 7 skipped on each of .NET 9 and .NET 10.
  • Extensions suite: 194 passed on .NET 9; 191 passed on .NET 10, including all 12 new cases.
  • DI library builds across netstandard2.0 and .NET 8/9/10; all 13 corrected XML documentation sites resolve correctly.
  • RMQTaskQueue sender and receiver builds pass.
  • A temporary harness outside the repository exercised the actual sample type with its mapper and the default sync/async mappers. Normal, empty and null greetings preserve their values and request/correlation IDs in all 9 cases. A tenth check covers reassignment through the sample mapper. The original getter-only source reproduced greeting loss for normal and empty values across all three mapper paths.

The permanent regression tests use the existing TestDoubles convention. Sample-specific checks were local only; no live RabbitMQ broker was used.

@gabisonia gabisonia added .NET Pull requests that update .net code V10.X 2 - In Progress labels Sep 23, 2026
@iancooper

Copy link
Copy Markdown
Member

Thanks @gabisonia

@iancooper
iancooper merged commit e63b31f into BrighterCommand:master Sep 25, 2026
48 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Done Bug Documentation .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs defect: 13 XML doc-comment lines say the default message mapper is CloudEventJsonMessageMapper; it is JsonMessageMapper<>

2 participants