The JSDoc for RouteRegistry.executeHandler lists the middleware pipeline as steps 1–5, but the actual code executes CORS handling as step 0 before guards. This makes the documentation inconsistent with the inline code comment (// 0. Handle CORS if enabled).
Just add step 0 to the JSDoc:
/**
* Execute a route handler with middleware pipeline
*
* Executes the full middleware pipeline:
* 0. CORS - Handle CORS headers and preflight
* 1. Guards - Authorization checks
* 2. Body parsing - Parse request body if present
* 3. Pipes - Transform/validate body
* 4. Handler - Execute route handler
* 5. Exception filters - Handle errors
*
* @param handler - Route handler function
* @param req - Request wrapper
* @param res - Response wrapper
* @param metadata - Optional middleware metadata
*/
The JSDoc for
RouteRegistry.executeHandlerlists the middleware pipeline as steps 1–5, but the actual code executes CORS handling as step 0 before guards. This makes the documentation inconsistent with the inline code comment (// 0. Handle CORS if enabled).Just add step 0 to the JSDoc: