Bump FastEndpoints and FastEndpoints.Swagger #8
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 from 6.2.0 to 7.1.0.
Release notes
Sourced from FastEndpoints'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:
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: