简体   繁体   中英

What broke FastAPI's Swagger UI? - It stopped working and shows API calls under a group named “default”

All of a sudden, FastAPI's Swagger UI stopped working. This happened on both my dev and production servers at the same time with different code repos.

The API itself seems to work properly, but the endpoints in Swagger don't expand properly.

This is the UI before clicking on one of the items "/sat-players/" 在此处输入图像描述

and this is how it looks after clicking on it. The item moves under a new category "default" which I didn't create. 在此处输入图像描述

Since it happened on both servers, I am suspecting that Swagger is updating files like stylesheets from an external CDN and there is a problem with these files.

What do you think is the issue?

It was a bug in Swagger UI v. 3.30.1, fixed in v. 3.30.2.

See also: https://github.com/tiangolo/fastapi/issues/1762

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM