ReadonlyeventThe event streams registered on this router, in registration order.
ReadonlyrawThe underlying express router, mounted at the contribution's path behind the token
verification. Full-power escape hatch: existing express routers and middlewares can
be mounted here unchanged, keeping their own request handling and response format.
Errors they do not handle themselves are reduced to the uniform error format and
unmatched paths are answered with 404 in that format, their routes are not
published in the OpenAPI document, and their build-scoped resources belong in
toDispose.
ReadonlyrouteThe typed routes registered on this router, in registration order.
ReadonlytoDisposed when the routing is rebuilt or the external API server stops.
Dispose this object.
Registers a GET route serving server-sent events. The returned stream manages the
connected clients (see ExternalApiEventStream) and is disposed with this
router, ending all client connections so that clients reconnect against a new
configuration.
Appends the fallback handling that answers unmatched paths below the contribution with
404 and reduces unhandled route errors, including malformed JSON bodies, to the
uniform error format. Called by the external API server once the contribution is
configured, so that it runs after all contributed routes.
Registers a typed PATCH route, validating the request body when a body schema is declared.
Registers a typed POST route, validating the request body when a body schema is declared.
Registers a typed PUT route, validating the request body when a body schema is declared.
Registers the routes of an
ExternalApiContribution, taking care of the recurring endpoint mechanics so that all contributions of the external API behave consistently:OpenApiDocumentBuilder.A router is created for each routing build and disposed before the next build (on configuration changes) and on shutdown: event streams are closed automatically, and contributions register their own build-scoped resources, such as event listeners, in toDispose.