chore: Bump FastEndpoints.Messaging.Remote from 6.1.0 to 7.1.0 #141
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.
Updated FastEndpoints.Messaging.Remote from 6.1.0 to 7.1.0.
Release notes
Sourced from FastEndpoints.Messaging.Remote's releases.
7.1
❇️ Help Keep FastEndpoints Free & Open-Source ❇️
Due to the current unfortunate state of FOSS, please consider becoming a sponsor and help us beat the odds to keep the project alive and free for everyone.
New 🎉
Better conditional sending of responses
All Send.*Async() methods now return a Task<Void> result. If a response needs to be sent conditionally, you can simply change the return type of the handler from Task to Task<Void> and return the awaited result as shown below in order to stop further execution of endpoint handler logic:
If there's no async work being done in the handler, the Task<Void> can simply be returned as well:
Specify max request body size per endpoint
Instead of globally increasing the max request body size in Kestrel, you can now set a max body size per endpoint where necessary like so:
In order to add your own custom response sending methods, simply target the
IResponseSenderinterface and write extension methods like so:This is obviously is a wide-reaching breaking change which can be easily remedied with a quick regex based find & replace. Please see the breaking changes section below for step-by-step instructions on how to migrate. Takes less than a minute.
Send multiple Server-Sent-Event models in a single stream
It is now possible to send different types of data in a single SSE stream with the use of a wrapper type called StreamItem like so:
This allows access if the user's "scope" claim includes ANY of the listed values. To require ALL scopes, use ScopesAll() instead.
By default, scopes are read from the "scope" claim, which can be changed like so:
If scope values aren't space-separated, customize parsing like so:
Automatic 'Accepts Metadata' for Non-Json requests
In the past, if an endpoint defines a request DTO type, an accepts-metadata of
application/jsonwould be automatically added to the endpoint, which would require the user to clear that default metadata if all the properties of the DTO is bound from non-json binding sources such as route/query/header etc.Now, if the user annotates all the properties of a DTO with the respective non-json binding sources such as the following: