Namespace FastEndpoints
Classes
BaseEndpoint
the base class all fast endpoints inherit from
BindFromAttribute
use this attribute to specify the name of route param, query param, or form field if it's different from the name of the property being bound to.
BindingOptions
request binding options
CommandExtensions
CommandHandler<TCommand>
inherit this base class if you'd like to manipulate validation state of the calling endpoint from within the command handler.
CommandHandler<TCommand, TResult>
inherit this base class if you'd like to manipulate validation state of the calling endpoint from within the command handler.
CommandHandlerBase<TCommand>
the base class from which all CommandHandler<TCommand> classes inherit from
Config
global configuration settings for FastEndpoints
DontInjectAttribute
endpoint properties marked with this attribute will disable property injection for that property
Endpoint<TRequest>
use this base class for defining endpoints that only use a request dto and don't use a response dto.
Endpoint<TRequest, TResponse>
use this base class for defining endpoints that use both request and response dtos.
Endpoint<TRequest, TResponse, TMapper>
use this base class for defining endpoints that use both request and response dtos as well as require mapping to and from a domain entity using a seperate entity mapper.
EndpointDefinition
represents the configuration settings of an endpoint
EndpointDiscoveryOptions
defines how endpoint discovery and registration should be done at startup
EndpointFactory
the default endpoint factory. it creates an instance of the endpoint and injects both constructor and property dependencies.
EndpointOptions
endpoint registration options
EndpointSummary
a class used for providing a textual description about an endpoint for swagger
EndpointSummary<TRequest>
EndpointWithMapper<TRequest, TMapper>
use this base class for defining endpoints that only use a request dto and don't use a response dto but uses a request mapper.
EndpointWithMapping<TRequest, TResponse, TEntity>
use this base class for defining endpoints that use both request and response dtos as well as require mapping to and from a domain entity.
EndpointWithoutRequest
use this base class for defining endpoints that doesn't need a request dto. usually used for routes that doesn't have any parameters.
EndpointWithoutRequest<TResponse>
use this base class for defining endpoints that doesn't need a request dto but return a response dto.
EndpointWithoutRequest<TResponse, TMapper>
use this base class for defining endpoints that doesn't need a request dto but return a response dto and uses a response mapper.
EpVersion
represents an enpoint version
ErrorOptions
error response customization settings
ErrorResponse
the dto used to send an error response to the client
Event<TEvent>
event notification bus which uses an in-process pub/sub messaging system
EventBase
base class for the event bus
EventExtensions
ExceptionHandlerExtensions
extensions for global exception handling
Factory
a factory for instantiaing endpoints for testing purposes
FromAttribute
properties decorated with this attribute will have their values auto bound from the relevant claim of the current user principal. this is a shorter alias for the [FromClaim] attribute.
FromBodyAttribute
properties decorated with this attribute will have their values auto bound from the incoming request's json body.
HINT: no other binding sources will be used for binding that property.
FromClaimAttribute
properties decorated with this attribute will have their values auto bound from the relevant claim of the current user principal
FromHeaderAttribute
properties decorated with this attribute will have their values auto bound from the relevant http header of the current request.
FromQueryParamsAttribute
properties decorated with this attribute will be bound by obtaining the values from query string parameters with matching names.
WARNING: valid only on complex types with at least one public property. only one dto property can be decorated with this attribute.
Group
common configuration for a group of endpoints can be specified by implementing this abstract class and calling Configure(String, Action<EndpointDefinition>) in the constructor.
HasPermissionAttribute
boolean properties decorated with this attribute will have their values set to true if the current principal has the specified permission.
HideFromDocsAttribute
attribute used to mark classes that should be hidden from public api
HttpAttribute
base http attribute class
HttpClientExtensions
a set of extensions to the httpclient in order to facilitate route-less integration testing
HttpContextExtensions
HttpDeleteAttribute
use this attribute to specify a DELETE route for an endpoint
HttpGetAttribute
use this attribute to specify a GET route for an endpoint
HttpPatchAttribute
use this attribute to specify a PATCH route for an endpoint
HttpPostAttribute
use this attribute to specify a POST route for an endpoint
HttpPutAttribute
use this attribute to specify a PUT route for an endpoint
HttpResponseExtensions
InternalErrorResponse
the dto used to send an error response to the client when an unhandled exception occurs on the server
MainExtensions
provides extensions to easily bootstrap fastendpoints in the asp.net middleware pipeline
Mapper<TRequest, TResponse, TEntity>
use this base class to define domain entity mappers for your endpoints.
HINT: entity mappers are used as singletons for performance reasons. do not maintain state in the mappers.
PlainTextRequest
use this dto if you need to model bind the raw content body of an incoming http request or you may implement the IPlainTextRequest interface on your own request dto.
PostProcessor<TRequest, TState, TResponse>
inherit this class to create a post-processor with access to the common processor state of the endpoint
PreProcessor<TRequest, TState>
inherit this class to create a pre-processor with access to the common processor state of the endpoint
ProblemDetails
RFC7807 compatible problem details/ error response class. this can be used by configuring startup like so:
app.UseFastEndpoints(x => x.Errors.ResponseBuilder = ProblemDetails.ResponseBuilder);
ProblemDetails.Error
the error details object
QueryParamAttribute
properties decorated with this attribute will have a corresponding request parameter added to the swagger schema
RequestBinder<TRequest>
the default request binder for a given request dto type
RequestMapper<TRequest, TEntity>
use this base class to define a domain entity mapper for your endpoints that only has a request dto and no response dto.
HINT: entity mappers are used as singletons for performance reasons. do not maintain state in the mappers.
ResponseMapper<TResponse, TEntity>
use this base class to define a domain entity mapper for your endpoints that only has a response dto and no request dto.
HINT: entity mappers are used as singletons for performance reasons. do not maintain state in the mappers.
RouteHandlerBuilderExtensions
SecurityOptions
global security options
SerializerOptions
serialization options for the endpoints
ServiceScopeExtensions
SubGroup<TParent>
common configuration for a sub group of endpoints can be specified by implementing this abstract class and calling Configure(String, Action<EndpointDefinition>) in the constructor.
Summary<TEndpoint>
Summary<TEndpoint, TRequest>
TestResult<TResponse>
a record encapsulating the http response as well as the resulting dto of a test execution
ThrottleAttribute
rate limit requests to this endpoint based on a request http header sent by the client.
ThrottleOptions
global settings for throttling
UserPrivileges
the priviledges of the user which will be embedded in the jwt or cookie
ValidationContext
provides a way to manipulate the validation failures of the current endpoint context. call Instance to obtain an instance of the current validation context.
ValidationContext<T>
ValidationFailureException
the exception thrown when validation failure occurs.
inspect the Failures
property for details.
Validator<TRequest>
inherit from this base class to define your dto validators
HINT: validators are registered as singletons. i.e. the same validator instance is used to validate each request for best performance. hance, do not maintain state in your validators.
VersioningOptions
global endpoint versioning options
Structs
BinderContext
binder context supplied to custom request binders.
EmptyRequest
a request dto that doesn't have any properties
EmptyResponse
a response dto that doesn't have any properties
ParseResult
dto used to hold the result of a value parsing operation
Interfaces
ICommand
interface for a command that does not return anything
ICommand<TResult>
interface for a command that returns a result
ICommandHandler
marker interface for all command handlers
ICommandHandler<TCommand>
interface to be implemented by a command handler for a given command type that does not return a result
ICommandHandler<TCommand, TResult>
interface to be implemented by a command handler for a given command type that returns a result
IEndpoint
the common interface implemented by all endpoints
IEndpointFactory
interface for the creation of endpoints.
IEvent
marker interface for an event model
IEventBus
interface to be implemented by an event bus
IEventHandler
marker interface for all event handlers
IEventHandler<TEvent>
interface to be implemented by event handlers
IGlobalPostProcessor
interface for defining global post-processors to be executed after the main endpoint handler is done
IGlobalPreProcessor
interface for defining global pre-processors to be executed before the main endpoint handler is called
IHasMapper
marker interface for endpoints that has a mapper
IHasMapper<TMapper>
marker/constraint for endpoints that have a mapper generic argument
IMapper
marker interface for entity mappers
IPlainTextRequest
implement this interface on your request dto if you need to model bind the raw content body of an incoming http request
IPostProcessor<TRequest, TResponse>
interface for defining post-processors to be executed after the main endpoint handler is done
IPreProcessor<TRequest>
interface for defining pre-processors to be executed before the main endpoint handler is called
IRequestBinder<TRequest>
create custom request binders by implementing this interface. by registering a custom modelbinder for an endpoint will completely disable the built-in model binding and completely depend on your implementation of the custom binder to return a correctly populated request dto for the endpoint.
IRequestMapper
marker interface for request only mappers
IResponseInterceptor
interface for defining a response interceptor to be executed before the main endpoint handler executes
IResponseMapper
marker interface for response only mappers
IServiceResolver
interface used by fastendpoints for resolving services from the DI container. implement this interface and register the implementation in MS DI for customizing service resolving.
IServiceResolverBase
interface used by fastendpoints for resolving services from the DI container. implement this interface and register the implementation in MS DI for customizing service resolving.
Enums
BindingSource
enum for choosing which binding sources the default request binder should use
Http
enum for specifying a http verb
Mode
enum for specifying the waiting mode for event notifications
Order
enum used to specify whether to execute global pre/post processors before endpoint level processors