Skip to content

Commit b60636f

Browse files
committed
[Regression] Re-enable regex support in excludePaths array
1 parent b9198bf commit b60636f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/openapi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ export function toOpenAPISchema(
314314

315315
if (
316316
(excludeStaticFile && route.path.includes('.')) ||
317-
excludePaths.includes(route.path) ||
317+
excludePaths.some((excludedPath) =>
318+
excludedPath instanceof RegExp
319+
? excludedPath.test(route.path)
320+
: excludedPath === route.path
321+
) ||
318322
excludeMethods.includes(method)
319323
)
320324
continue

0 commit comments

Comments
 (0)