ardatan/feTS

json body validation with zod models is not applied when `text` content-type is provided

n1ru4l opened this issue · 0 comments

n1ru4l commented

Describe the bug

When doing an HTTP call without the content-type: application/json header to a route handler that has a json body zod validation object defined, the handler is invoked and not guarded by the zod check.

Reproduction: #672

Expected behavior

It should raise an error that the wrong header (e.g. text/plain;charset=UTF-8 was provided).