Created with Symbol.for, not Symbol(), so two copies of this package in
one process resolve the same key — the SECURITY_METADATA
precedent, and for the same reason: a locally-created symbol would simply
miss on every read, silently.
The HANDLER is the carrier rather than a middleware function, unlike
SECURITY_METADATA and VALIDATION_METADATA. Those two
brand middleware because a guard and a validator ARE middleware; a success
status is a property of the handler, and a route may carry no middleware at
all — branding a synthetic middleware purely to carry it would add a pipeline
entry that does nothing.
Prefer withResponseMetadata and responseMetadataOf
over touching this directly; the symbol is exported so a handler produced
outside @setu-ts/decorator-plugin can be branded too.
Key under which a
RouteHandlercarries itsRouteResponseMetadata.Created with
Symbol.for, notSymbol(), so two copies of this package in one process resolve the same key — theSECURITY_METADATAprecedent, and for the same reason: a locally-created symbol would simply miss on every read, silently.The HANDLER is the carrier rather than a middleware function, unlike
SECURITY_METADATAandVALIDATION_METADATA. Those two brand middleware because a guard and a validator ARE middleware; a success status is a property of the handler, and a route may carry no middleware at all — branding a synthetic middleware purely to carry it would add a pipeline entry that does nothing.Prefer
withResponseMetadataandresponseMetadataOfover touching this directly; the symbol is exported so a handler produced outside@setu-ts/decorator-plugincan be branded too.