-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Description
When the only entry point in the project is assigned tags that match those specified in the exclude.tags
option,
the documentation will not be generated.
Reproduction
Consider the following code
import Elysia from "elysia";
import openapi from "@elysiajs/openapi";
export const app = new Elysia()
.use(
openapi({
exclude: {
tags: ["internal"],
},
})
)
.get("/", () => "index")
.get("/healthz", () => ({ status: "ok" }), {
detail: {
tags: ["internal"],
},
})
.listen(3000);
- Run the server
- Open http://localhost:3000/openapi
- Check logs and page
Server logs
[@elysiajs/openapi] error at specPath
TypeError: undefined is not an object (evaluating 'hooks.detail.tags')
at toOpenAPISchema (__/node_modules/@elysiajs/openapi/dist/index.mjs:2895:30)
at openAPISchema (__/node_modules/@elysiajs/openapi/dist/index.mjs:9354:9)
at handle (file://__/node_modules/elysia/dist/bun/index.js:6:76)
at handle (file://__/node_modules/elysia/dist/bun/index.js:6:80)
at map (file://__/node_modules/elysia/dist/bun/index.js:4:38)
[@elysiajs/openapi] error at specPath
TypeError: undefined is not an object (evaluating 'hooks.detail.tags')
at toOpenAPISchema (__/node_modules/@elysiajs/openapi/dist/index.mjs:2895:30)
at openAPISchema (__/node_modules/@elysiajs/openapi/dist/index.mjs:9354:9)
at handle (file://__/node_modules/elysia/dist/bun/index.js:6:76)
at handle (file://__/node_modules/elysia/dist/bun/index.js:6:80)
at map (file://__/node_modules/elysia/dist/bun/index.js:4:38)
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