🔧 fix: 1.3.0-exp.1

This commit is contained in:
saltyaom
2025-05-01 22:53:21 +07:00
parent 65b20fcd3d
commit 2e27893a3d
8 changed files with 827 additions and 264 deletions
+7 -2
View File
@@ -5,7 +5,7 @@ const schema = t.Object({
test: t.Literal('hello')
})
const app = new Elysia({ precompile: true })
const app = new Elysia()
.use(
swagger({
provider: 'scalar',
@@ -45,10 +45,15 @@ const app = new Elysia({ precompile: true })
.get(
'/',
() => {
return { test: 'hello' }
return { test: 'hello' as const }
},
{
response: 'schema'
}
)
.post('/json', ({ body }) => body, {
parse: 'formdata',
body: 'schema',
response: 'schema'
})
.listen(3000)