@hono/zod-openapi: How to write OpenAPI doc for middleware responses?
I have an auth middleware which will check if the api token is provided in the request header, so it will respond with 401 or pass.
How to make sure every protected route will be applied with the 401 response?
1 Reply
oh i figured it out.
must explicitly given the response status to prevent type error.