github FastEndpoints/FastEndpoints v5.18
v5.18 Release

latest releases: v8.1.0-beta.21, v8.1.0-beta.20, v8.1.0-beta.19...
2 years ago

✨ Looking For Sponsors ✨

FastEndpoints needs sponsorship to sustain the project. Please help out if you can.


New 🎉

Source generated DI registrations

Please see the documentation for details of this feature.

Source generated access control lists

Please see the documentation for details of this feature.

Ability to show deprecated endpoint versions in Swagger

By default, deprecated endpoint versions are not included in swagger docs. Now you have the choice of including/displaying them in the doc so they'll be displayed greyed out like this:

image

Please see this usage example on how to enable it.

Round-Robin Event delivery with gRPC

It is now possible to deliver an event to only just one of the connected remote subscribers in a round-robin fashion. Comes in handy when you need to distribute the workload among a pool of subscribers/workers and ensure that a single event is only processed by a single remote subscriber. See the documentation for more info.

Improvements 🚀

Ability to get rid of null-forgiving operator '!' from test code

The TestResult<TResponse>.Result property is no longer a nullable property. This change enables us to get rid of the null-forgiving operator ! from our integration test code.
Existing test code wouldn't have to change. You just don't need to use the ! to hide the compiler warnings anymore. If/when the value of the property is actually null, the tests will
just fail with a NRE, which is fine in the context of test code.

Optimize source generator performance

The type discovery generator is now highly efficient and only generates the source when any of the target types changes or new ones are added.

Optimize startup routine

Authorization policy building is moved to the MapFastEndpoints stage avoiding the need to iterate the discovered endpoint collection twice. This also avoids any potential race conditions due to different middleware pipeline config/ordering edge cases.

Fixes 🪲

Startup issue due to 'IAuthorizationService' injection

v5.16 had introduced a bug of not being able to inject IAuthorizationService into endpoint classes, which has now been fixed.

Startup type discovery issue with exclusion list

Since you can override the exclusion list by doing:

.AddFastEndpoints(o.Assemblies = new[] { typeof(SomeClass).Assembly });

This was not working if the assembly name didn't have a dot (.) in the namespace.

Empty swagger parameter example generation

The swagger operation processor was creating an example field with an empty string when there's no example provided by the user like the following:

"parameters": [
    {
    ...
    "example": ""
    }
Swagger parameter example generation with default values

The swagger operation processor was creating an example field with the default value when there's no example or DefaultValue provided by the user like the following:

"parameters": [
    {
    ...
    "example": 0
    }
Allow customizing serialization/deserialization of Event/Command objects in Job/Event Queue storage

See code example and related issue: #480

Minor Breaking Change ⚠️

'AddFastEndpoints()' no longer calls 'AddAuthorization()'

Due to the startup optimization mentioned above, you will now be greeted with the following exception if your app is using authorization middleware:

Unhandled exception. System.InvalidOperationException: Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' in the application startup code.

It's because AddFastEndpoints() used to do the AddAuthorization() call internally which it no longer does. Simply add this call yourself to the middleware pipeline.

Don't miss a new FastEndpoints release

NewReleases is sending notifications on new releases.