Effect-TS / effect

An ecosystem of tools to build robust applications in TypeScript
https://effect.website
MIT License
7.74k stars 246 forks source link

api reports that endpoint without parameters can return 400 #3984

Open ryskajakub opened 1 week ago

ryskajakub commented 1 week ago

What version of Effect is running?

"@effect/platform": "^0.69.24"

What steps can reproduce the bug?

I define:

    HttpApiEndpoint.get('home', '/')
      .addSuccess(HttpApiSchema.NoContent)

without any errors

What is the expected behavior?

generated openapi won't include any error response, only 204

What do you see instead?

I can see

400 The request did not match the expected schema

in the list of possible responses

Screenshot from 2024-11-22 18-11-47

Additional information

looks like this response is added to every endpoint, it should only be in endpoints having any input schema