-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
Description
exclude.paths
are not working use RegEXp
Reproduction
Consider the following code
import Elysia from "elysia";
import openapi from "@elysiajs/openapi";
export const app = new Elysia()
.use(
openapi({
exclude: {
paths: [/^\/v1/],
},
})
)
.get("/", () => "index")
.get("/v1", () => "v1")
.get("/v1/foo", () => "v1")
.get("/v2", () => "v2")
.get("/v3", () => "v3")
.listen(3000);
- Run the server
- Open http://localhost:3000/openapi
- Check the list of APIs in the page

/v1/*
entry points should not being listed
It seems that only plain string matching the exact API are working
Specs
System:
OS: macOS 26.0.1
CPU: (8) arm64 Apple M3
Memory: 426.36 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.9.0
Yarn: 1.22.22
npm: 11.6.0
pnpm: 10.18.1
bun: 1.2.23
npmPackages:
@elysiajs/openapi: ^1.4.11 => 1.4.11
elysia: latest => 1.4.9
Metadata
Metadata
Assignees
Labels
No labels