Overview
TheEndpointsFactory class creates endpoint builders that include middleware, result handlers, and shared configuration. It provides a fluent API for composing reusable endpoint factories.
Pre-built Factories
defaultEndpointsFactory
Uses
defaultResultHandler with standard JSON responsesarrayEndpointsFactory
(Deprecated) For migrating legacy APIs that return arrays
Methods
build()
Creates an endpoint with input/output schemas and a handler.buildVoid()
Shorthand for endpoints that return empty objects.addMiddleware()
Adds middleware that provides context and executes before endpoints.addExpressMiddleware() / use()
Integrates native Express middleware.addContext()
Provides request-independent context.See Also
Endpoint
Individual endpoint documentation
Middleware
Create and use middleware