elysia
elysia copied to clipboard
additionalProperties do not work in nested response objects
What version of Elysia is running?
1.1.17
What platform is your computer?
Darwin 24.0.0 arm64 arm
What steps can reproduce the bug?
Run on Stackblitz: https://stackblitz.com/edit/elysia-iqupsh?file=index.ts
new Elysia().get(
'/',
async () => {
return { keys: [{ a: 1, b: 2 }] };
},
{
response: t.Object({
keys: t.Array(
t.Object({ a: t.Number() }, { additionalProperties: true })
),
}),
}
)
This also happens on Bun.
What is the expected behavior?
{
"keys": [
{
"a": 1,
"b": 2
}
]
}
What do you see instead?
{
"keys": [
{
"a": 1
}
]
}
Additional information
No response
Have you try removing the node_modules
and bun.lockb
and try again yet?
No response