I'm working on a FastAPI application and encountered an issue: when I raise an HTTPException, it seems that FastAPI doesn't automatically include detailed response information for that exception in the Swagger documentation. I would like FastAPI to automatically add response documentation for these exceptions in Swagger.
I've tried manually adding the responses parameter to each route, but it's getting a bit tedious to do so for every exception. Is there a way to automatically generate response documentation for HTTPException in Swagger?