When I try to use the default docs in FastApi never works. If I use /docs it gives an error saying:
"Failed to load API definition. Error Hide Fetch Internal Server Error /openapi.json"
and if I use /redoc it loads forever and never appears anything. I searched a lot but the only thing I found out was someone using root_pah="/folder/" inside of the FastAPI() main instance, so I used the app folder which is the repository of the whole api project. I don't know if it will help you guys but the tree of the project is:
C:.
├───.pytest_cache
│ └───v
│ └───cache
├───alembic
├───app
│ ├───models
│ │ └───__pycache__
│ ├───routers
│ │ └───__pycache__
│ ├───tests
│ │ ├───.pytest_cache
│ │ │ └───v
│ │ │ └───cache
│ │ └───__pycache__
│ └───__pycache__
├───venv
│ ├───Include
│ │
│ └───Scripts
└───__pycache__
p.s. I wiped most of the part of the venv directory because I thought that it was useless for this and also when I tried to copy and paste the whole output in here, Stack Overflow would accept just part of it because it was too big.