Repository navigation
Replies: 1 comment 1 reply
|
The
So the fix is to give the route an explicit schema instead of relying on const routes = new Elysia()
.post("/upload", ({ body }) => {
// body.file is now typed and validated too
}, {
body: t.Object({
file: t.File(),
}),
})This gets you both things at once, correct runtime validation of the upload and a correctly generated |

Uh oh!
There was an error while loading. Please reload this page.
I try
But i will rewrite all route parse, like
The openapiJson of
/uploadalso isapplication/jsonAll reactions