Skip to content

Bump Foundatio.Mediator from 1.1.0 to 1.2.1#290

Merged
github-actions[bot] merged 1 commit intomainfrom
dependabot/nuget/Foundatio.Mediator-1.2.1
Apr 28, 2026
Merged

Bump Foundatio.Mediator from 1.1.0 to 1.2.1#290
github-actions[bot] merged 1 commit intomainfrom
dependabot/nuget/Foundatio.Mediator-1.2.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 28, 2026

Updated Foundatio.Mediator from 1.1.0 to 1.2.1.

Release notes

Sourced from Foundatio.Mediator's releases.

1.2.1

Bug Fixes

  • Fix compilation error in middleware-only projects — The source generator emitted using Foundatio.Mediator.Generated; unconditionally in _FoundatioModule, but that namespace only exists when handler wrapper types are generated. Projects containing only middleware (no handlers) failed with CS0234: The type or namespace name 'Generated' does not exist. The using directive is now conditionally emitted only when the project has at least one handler.
  • Rename _FoundatioModule hint to .g.cs — The generated file now follows the .g.cs naming convention so test infrastructure properly validates it for compilation errors.

Full Changelog: FoundatioFx/Foundatio.Mediator@v1.2.0...v1.2.1

1.2.0

What's New

Endpoint Conventions & Customization

  • IEndpointConvention<TBuilder> — New interface for compile-time endpoint customization via attributes. Convention attributes on methods, classes, or assemblies configure endpoint/group builders at startup without runtime reflection. Supports 3-level precedence with most-derived-wins deduplication (method overrides class overrides assembly). (#​176)
  • Customizable result-to-HTTP mapping — New IMediatorResultMapper<TResult> interface allows overriding the default Result<T>-to-HTTP status code mapping in generated endpoints. Register a custom mapper before AddMediator() to override the defaults. (#​177)

Route Constraints

  • Auto-generated route constraints — Route parameters now automatically include type constraints based on the message property type (e.g., {orderId:guid}, {itemId:long}, {widgetId:int}). Supported types: int, long, guid, bool, datetime, decimal, double, float. String parameters remain unconstrained.

Endpoint Attribute Improvements

  • Route shorthand constructor[HandlerEndpoint("{productId}")] instead of [HandlerEndpoint(Route = "{productId}")]
  • Positional constructor[HandlerEndpoint(HandlerMethod.Get, "/{productId}")] for concise explicit endpoint declarations
  • HandlerMethod-only constructor[HandlerEndpoint(HandlerMethod.Get)] for endpoints with no additional route segment beyond the group prefix
  • [StringSyntax("Route")] annotation — Route parameters on [HandlerEndpoint] now have IDE route-completion support (with a netstandard2.0 polyfill)

"Make Endpoint Explicit" Code Fix

  • New code fix for FMED017 — Offers "Make endpoint explicit" and "Make all endpoints in class explicit" actions that insert [HandlerEndpoint] and [HandlerEndpointGroup] attributes to freeze convention-based routes so they won't change across library versions

Breaking Changes

  • EndpointHttpMethod renamed to HandlerMethod — The HTTP method enum used in endpoint attributes has been renamed for clarity
  • HttpMethod property renamed to Method on HandlerEndpointAttribute
  • RateLimitedAttribute renamed to EndpointRateLimiterAttribute — More consistent naming with the endpoint convention system

Bug Fixes

  • Fix TrimStart char-array bug in TypeSymbolInfo.GetQualifiedNameTrimStart("global::".ToCharArray()) was stripping individual characters from the set instead of the prefix string, causing incorrect qualified names for types like long, bool, and object
  • Support non-record message types in endpoint generation — GET/DELETE constructor-binding now uses object initializer syntax for class types instead of record-only named constructor args; skip [AsParameters] binding for zero-property message types
  • Fix nullable warning in RetryMiddleware sampleGetPolicy() now falls back to the default policy when the named policy is not found

Documentation

  • Added locking routes section and FMED017/FMED018 diagnostic documentation
  • Added endpoint conventions section covering IEndpointConvention<T> interface, scoping, and deduplication
  • Clarified that endpoint generation is opt-in
  • Fixed XML docs on HandlerEndpointGroupAttribute and MediatorConfigurationAttribute

Dependencies

  • Foundatio packages updated to 13.0.0
  • Microsoft.SourceLink.GitHub 10.0.203
  • .NET 10.0.7 package updates (BCL, AspNetCore, DI, Hosting, Diagnostics)
  • Scalar.AspNetCore 2.14.6

Full Changelog: FoundatioFx/Foundatio.Mediator@v1.1.0...v1.2.0

Commits viewable in compare view.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

---
updated-dependencies:
- dependency-name: Foundatio.Mediator
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Apr 28, 2026
@github-actions github-actions Bot merged commit 462c544 into main Apr 28, 2026
2 of 3 checks passed
@dependabot dependabot Bot deleted the dependabot/nuget/Foundatio.Mediator-1.2.1 branch April 28, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants