elysiajs / elysia

Ergonomic Framework for Humans
https://elysiajs.com
MIT License
10.25k stars 219 forks source link

Typebox Boolean regression in 1.1.17 #872

Open ryanleecode opened 6 days ago

ryanleecode commented 6 days ago

What version of Elysia is running?

1.1.17

What platform is your computer?

Linux 6.6.52-1-MANJARO x86_64 unknown

What steps can reproduce the bug?

Create api route where query parameter has a boolean

for example

query: t.Object({
  registered: t.Optional(
    t.Boolean({
      description: 'Filter usernames by registration status',
    }),
  ),
}),

Submit request and do not include the boolean value, in this case omit registered

What is the expected behavior?

it works

What do you see instead?

Tybebox Error

Additional information

No response

Have you try removing the node_modules and bun.lockb and try again yet?

No response

aburii commented 1 day ago

I've been experiencing the same when using optional booleans in query parameters

image