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