From b60636fdd9f95faedb3deba9d5c9182f3fd63bf5 Mon Sep 17 00:00:00 2001 From: Antonio Date: Mon, 22 Sep 2025 14:12:36 +0200 Subject: [PATCH] [Regression] Re-enable regex support in excludePaths array --- src/openapi.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openapi.ts b/src/openapi.ts index d99e9c7..4dafdbc 100644 --- a/src/openapi.ts +++ b/src/openapi.ts @@ -314,7 +314,11 @@ export function toOpenAPISchema( if ( (excludeStaticFile && route.path.includes('.')) || - excludePaths.includes(route.path) || + excludePaths.some((excludedPath) => + excludedPath instanceof RegExp + ? excludedPath.test(route.path) + : excludedPath === route.path + ) || excludeMethods.includes(method) ) continue