H
Hono4w ago
Need_Not

OpenAPI not validating content type?

Let's say I have a post endpoint that takes json like this
{
"name": "test"
"age: 30
}
{
"name": "test"
"age: 30
}
with zod and openApi it works great. If i dont include a property it will give me an error. But the moment I send a plain text request with whatever it just bypasses everything I guess then I end up with errors because my values are null
1 Reply
Need_Not
Need_NotOP4w ago
actually for that matter just don't even include a body oh nvm i needed required: true on body

Did you find this page helpful?