-
-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.22
What platform is your computer?
Darwin 25.2.0 arm64 arm
What environment are you using
Bun 1.3.7
Are you using dynamic mode?
no
Summary
Using parse: "none" is required to preserve raw request bodies, but it prevents the body schema from appearing in generated OpenAPI documentation. I still want the schema included for docs/typing even when parsing is disabled.
Expected Behavior
When parse: "none" is set, Elysia should still include the body schema in OpenAPI output (and ideally typing), even if runtime validation/parsing is skipped.
Actual Behavior
The body schema is omitted from OpenAPI docs when parse: "none" is present.
Reproduction
import { Elysia, t } from "elysia";
import { openapi } from "@elysiajs/openapi";
new Elysia()
.use(openapi())
.post(
"/echo",
({ request }) => request,
{
body: t.Object({ input: t.String() }),
parse: "none",
},
)
.listen(3000);Steps
- Open
/openapiendpoint - Check
POST /echorequest body schema. - Observe it’s missing.
Notes
I need raw body handling, but still want accurate OpenAPI docs for clients.
turisanapo
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working