FastAPI: The solution to the failure of the docs document to load

When using FastAPI to develop recently, I found that the automatically generated API interaction documents could not be loaded? ? So I went to github and looked at it, and someone has already raised this question:

      Portal
insert image description here

Finally, it was found that some users could not fully load the API interaction document after Swagger-ui was updated to version 3.30.1, not the problem of FastAPI

Then I scrolled down and found that tiangolo, the author of FastAPI, commented below:insert image description here

He released a new release version 0.60.1 of fastapi, which replaced the swagger-ui used by fastapi before, and replaced it with its last available version, that is: swagger-ui 3.30.0

So all you have to do is update your fastapi:

pip install --upgrade fastapi

insert image description here
I believe this problem will be officially resolved by swagger-ui soon.

Guess you like

Origin blog.csdn.net/qq_44683653/article/details/107542463