fastapi-responses
fastapi-responses copied to clipboard
Find HTTPExceptions and turn them into documented responses! :tada:
Thank's for good util. I think the next innovation will be quite useful -> https://pastebin.com/hjCPhqm5 I forked it.
**My HTTPException:** `raise HTTPException(status_code=403, detail="Указанный email уже зарегистрирован", headers={"WWW-Authenticate": "Bearer"})` **Redoc:** Everything works fine without Headers. It would also be good to add each error directly to the examples of...
The problem is reproducible with: ```python from fastapi_responses import custom_openapi from fastapi import FastAPI, HTTPException from sqlalchemy import exists app = FastAPI() app.openapi = custom_openapi(app) @app.get("/{item_id}") def get_item(item_id: int): exists...
Hi there! Thanks for this library, it looks like exactly what I need! In my project, I'm using [`fastapi.status`](https://fastapi.tiangolo.com/tutorial/response-status-code/#shortcut-to-remember-the-names) constants to make it clearer what the status codes are doing....
fastapi HTTPExceptions support fastapi.status codes as legit status_code values. [Example](https://fastapi.tiangolo.com/advanced/response-change-status-code/#use-a-response-parameter). If an HTTPException contains such a status_code, the eval(statement) in exceptions_functions failed and the exception is not recorded. This is...
When using this custom_openapi responses, the root_path is not taken into account, I found it the hard way. I do hope it will be fixed soon. Detailed: For some reason,...
The idea of this issue is to change the implementation: from tokens to [LibCST](https://libcst.readthedocs.io/). It's not that trivial, but I can guide anyone interested. The idea is to: 1. Find...
I'll not merge this into `fastapi-responses`. I'll create another package, and then use it here The idea is to first map all function definitions and calls that are inside of...
Doesn't work if it hits on a recursive function