Open
Conversation
Bumps FastEndpoints.Testing from 5.31.0 to 8.0.1 Bumps Microsoft.AspNetCore.Mvc.Testing from 10.0.0 to 10.0.3 Bumps Microsoft.AspNetCore.TestHost from 10.0.0 to 10.0.3 --- updated-dependencies: - dependency-name: FastEndpoints.Testing dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Mvc.Testing dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.AspNetCore.TestHost dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Testing from 5.31.0 to 8.0.1.
Release notes
Sourced from FastEndpoints.Testing's releases.
8.0.1
Due to low financial backing by the community, FastEndpoints will soon be going into "Bugfix Only" mode until the situation improves. Please join the discussion here and help out if you can.
New 🎉
Support for Native AOT compilation
FastEndpoints is now Native AOT compatible. Please see the documentation here on how to configure it.
If you'd like to jump in head first, a fresh AOT primed starter project can be scaffolded like so:
If you've not worked with AOT compilation in .NET before, it's highly recommended to read the docs linked above.
Auto generate STJ JsonSerializationContexts
You no longer need to ever see a
JsonSerializerContextthanks to the new serializer context generator in FastEndpoints. (Unless you want to that is 😉). See the documentation here on how to enable it for non-AOT projects.Distributed job processing support
The job queueing functionality now has support for distributed workers that connect to the same underlying database. See the documentation here.
Qualify endpoints in global configurator according to endpoint level metadata
You can now register any object as metadata at the endpoint level like so:
There's no setup (nor code changes) needed for projects using FastEndpoints main library. The above is only for when you want to use the messaging functionality in projects that don't have FastEndpoints.
Standalone package for Job Queues functionality
The job queuing functionality has also been extracted out to a separate package
FastEndpoints.JobQueueswhich can be used independently of the main FE library. No code changes are needed for existing FE projects.Aspire Testing support for routeless test helpers
You can now use the routeless test helpers such as
.GETAsync<MyEndpoint>()with AspireDistributedApplicationtesting 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:
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:
Auto population of headers in routeless tests
Given a request dto such as the following where a property is decorated with the
[FromHeader]attribute:Previously, you had to manually add the header to the request in order for the endpoint to succeed without sending back an error response.
Now you can simply supply the value for the header when making the request as follows, and the header will be automatically added to the request with the value from the property.
This automatic behavior can be disabled as follows if you'd like to keep the previous behavior:
... (truncated)
6.0
❇️ 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.
Breaking Changes⚠️
New 🎉
Support for .NET 10 preview
You can start targeting
net10.0SDK in your FE projects now. Currently preview versions of the dependencies are used.Generic Pre/Post Processor global registration
Open generic pre/post processors can now be registered globally using the endpoint configurator func like so:
Middleware pipeline for Command Bus
By popular demand from people moving away from MediatR, a middleware pipeline similar to MediatRs pipeline behaviors has been added to FE's built-in command bus. You just need to write your pipeline/middleware pieces by implementing the interface
ICommandMiddleware<TCommand,TResult>and register those pieces to form a middleware pipeline as described in the documentation.Support 'CONNECT' and 'TRACE' verbs
... (truncated)
5.35
❇️ 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 🎉
Bypass endpoint caching for integration tests
You can now easily test endpoints that have caching enabled, by using a client configured to automatically bypass caching like so:
Mark properties as "bind required"
You can now make the request binder automatically add a validation failure when binding from route params, query params, and form fields by decorating the dto properties if the binding source doesn't provide a value:
Generic command support for job queues
Closed generic commands can now be registered like so:
... (truncated)
5.34
❇️ 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 🎉
Queued job progress tracking
It is now possible to queue a job and track its progress and/or retrieve intermediate results while the command handler executes via the job tracker as documented here.
Global 'JwtCreationOptions' support for refresh token service
If you configure jwt creation options at a global level like so:
The
RefreshTokenServicewill now take the default values from the global config if you don't specify anything when configuring the token service like below:Global response modifier setting
A new global action has been added which gets triggered right before a response is written to the response stream allowing you to carry out some common logic that should be applied to all endpoints.
... (truncated)
5.33
❇️ 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 🎉
Migrate to xUnit v3⚠️
If you're using the
FastEndpoints.Testingpackage in your test projects, take the following steps to migrate your projects:.csprojfile:xunitv2 package.xunit.v3library with version1.0.0xunit.runner.visualstudioto3.0.0AppFixture<TProgram>classes, such asSetupAsyncandTearDownAsync. Change their return type fromTasktoValueTaskto resolve these errors.XUnit.Abstractionsnamespace not being found, simply delete those "using statements" as that namespace has been removed in xUnit v3.After doing the above, it should pretty much be smooth sailing, unless your project is affected by the removal of previously deprecated classes as mentioned in the "Breaking Changes" section below.
Eliminate the need for [BindFrom(...)] attribute
Until now, when binding from sources other than JSON body, you had to annotate request DTO properties with the
[BindFrom("my_field")]attribute when the incoming field name is different to the DTO property name. A new setting has now been introduced which allows you to use the same property naming policy as the serializer for matching incoming request parameters without having to use any attributes.This only applies to properties where you haven't specified the field names manually using an attribute such as
[BindFrom(...)],[FromClaim(...)].[FromHeader(...)]etc.Control binding sources per DTO property
The default binding order is designed to minimize attribute clutter on DTO models. In most cases, disabling binding sources is unnecessary. However, for rare scenarios where a binding source must be explicitly blocked, you can now do the following:
... (truncated)
5.32
❇️ 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 🎉
.NET 9.0 Support
Migration to .NET 9.0 SDK is now complete. You can now target
net9.0sdk without any issues.Support for enforcing antiforgery token checks for non-form requests
The antiforgery middleware can now be configured to check antiforgery tokens for any content-type by configuring it like so:
User configurable Endpoint Name (Operation Id) generation
The endpoint name generation logic can now be overriden at a global level like so:
Global configuration of 'JwtCreationOptions'
You can now configure
JwtCreationOptionsonce globally like so: