I've come across some strange behavior in automatic interactive API documentation (provided by Swagger UI)
when I get to the page
http://127.0.0.1:8000/docs
The list of routes is displayed with the parameters I have set: prefix, tags. So far, so good.

Problems begin when I click on any of the methods. A new group with thetags=default parameter appears on the page and the endpoint that I clicked is automatically added to it. By successively clicking on all my endpoints I end up with one group with tags=default in which all my endpoints are concentrated. But I can't see their contents, because when I click on any of them I see an infinitely spinning boot.

This behavior is observed on both the local machine and the remote server.
In the main.py file, I use this routing system
app.include_router(text_ocr.router, prefix='/image', tags=['image'])
app.include_router(notes.router, prefix='/notes', tags=['notes'])
app.include_router(product.router, prefix='/product', tags=['product'])
For the purity of the experiment, I commented on these call points and added a standard endpoint from the documentation
# app.include_router(text_ocr.router, prefix='/image', tags=['image'])
# app.include_router(notes.router, prefix='/notes', tags=['notes'])
# app.include_router(product.router, prefix='/product', tags=['product'])
@app.get("/")
async def root():
return {"message": "Hello World"}
But I got the same result.
I have the same problem but only in Chrome. In Firefox everything works as expected.
I am seeing this issue in firefox/chrome/safari on instances that were deployed days ago. The "authorize" button in the top right has also disappeared.
@tanzerm Same problem in Firefox
This issue was solved in FastAPI 0.60.1.
Please upgrade your FastAPI version.
Confirmed, after the version update, the problem has disappeared.
@Kludex Thank you, this solved the problem for me!
I am still experiencing the same problem even with the latest version with FastAPI 0.60.1
@rbcabreraUPM It may be useful to say that you were also facing this issue: https://github.com/tiangolo/fastapi/issues/1780
As we see by the comments above, others are not facing the swagger issue in FastAPI 0.60.1. I may suggest you to check your environment setup.
@rbcabreraUPM It may be useful to say that you were also facing this issue: #1780
As we see by the comments above, others are not facing the swagger issue in FastAPI 0.60.1. I may suggest you to check your environment setup.
I got it working already. dont know why it wasn't working before. thanks for the help!
Thanks for the help here everyone! :clap: :bow:
Thanks for reporting back and closing the issue :+1:
Most helpful comment
This issue was solved in FastAPI 0.60.1.
Please upgrade your FastAPI version.